Skip to content

Commit

Permalink
improve output format
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanejohnson committed Jun 30, 2023
1 parent 34acb60 commit 7f7ac0c
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions cmd/checkintermediatecmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,18 @@ func (ci *CheckIntermediateCmd) run() error {
}
}
}
log.Printf("dumpCerts is: %t\n", ci.dumpCerts)
if ci.dumpCerts {
log.Printf("# ---------- dumping return from server ----------")
log.Printf("# ---------- leaf ----------")
log.Printf("# leaf: %s", leaf.Subject.String())
log.Printf("# ---------- intermediates ----------")

fmt.Fprintf(w, "# ---------- dumping return from server ----------\n")
fmt.Fprintf(w, "# ---------- leaf ----------\n")
writeCert(w, leaf)

fmt.Fprintf(w, "# ---------- intermediates ----------\n")
if len(ints) == 0 {
fmt.Fprintf(w, "# ---------- none returned ----------\n")
}
for _, c := range ints {
log.Printf("# intermediate: %s", c.Subject.String())
writeCert(w, c)
}
}

Expand Down

0 comments on commit 7f7ac0c

Please sign in to comment.