-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.go
More file actions
50 lines (42 loc) · 1.17 KB
/
Copy pathmain.go
File metadata and controls
50 lines (42 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package main
import (
"flag"
"fmt"
"runtime"
"time"
)
var (
// BuildTime holds the timestamp (RFC3339) of the last build.
BuildTime string
// CommitHash holds the Git commit SHA at build time.
CommitHash string
// GOARCH holds the target architecture string (e.g. "amd64", "arm64") injected at build time.
GOARCH string
debugLogging *bool
showLintErrors *bool
clientTimeout time.Duration = 60 // Seconds
intermediatesFile = "intermediates.pem"
)
func main() {
updateFlag := flag.Bool("update", true, "update crl files")
checkFlag := flag.Bool("check", true, "check crl files")
showLintErrors = flag.Bool("show-lint-errors", true, "show linting errors")
// ocspFlag := flag.Bool("ocsp", false, "check ocsp responses")
debugLogging = flag.Bool("debug", false, "debug mode")
flag.Parse()
// Print Version Information
fmt.Println("Starting Certificate Revocation List Monitor.")
fmt.Println("Go version:", runtime.Version(),
"BuildTime:", BuildTime,
"CommitHash:", CommitHash,
"GOARCH:", GOARCH)
if *debugLogging {
fmt.Println("Debug logging enabled")
}
if *checkFlag {
check()
}
if *updateFlag {
updateCRLs()
}
}