Skip to content

Commit

Permalink
-intermediate switch is optional
Browse files Browse the repository at this point in the history
  • Loading branch information
jessepeterson committed Aug 24, 2022
1 parent 0ca17b4 commit a261f08
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions cmd/nanomdm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,12 @@ func main() {
if err != nil {
stdlog.Fatal(err)
}
intsPEM, err := os.ReadFile(*flIntsPath)
if err != nil {
stdlog.Fatal(err)
var intsPEM []byte
if *flIntsPath != "" {
intsPEM, err = os.ReadFile(*flIntsPath)
if err != nil {
stdlog.Fatal(err)
}
}
verifier, err := certverify.NewPoolVerifier(caPEM, intsPEM, x509.ExtKeyUsageClientAuth)
if err != nil {
Expand Down

0 comments on commit a261f08

Please sign in to comment.