diff --git a/cmd/certdump/certdump.go b/cmd/certdump/certdump.go index 57feadd..6bfb64d 100644 --- a/cmd/certdump/certdump.go +++ b/cmd/certdump/certdump.go @@ -185,8 +185,11 @@ func displayCert(cert *x509.Certificate) { func displayAllCerts(in []byte, leafOnly bool) { certs, err := helpers.ParseCertificatesPEM(in) if err != nil { - Warn(TranslateCFSSLError(err), "failed to parse certificates") - return + certs, _, err = helpers.ParseCertificatesDER(in, "") + if err != nil { + Warn(TranslateCFSSLError(err), "failed to parse certificates") + return + } } if len(certs) == 0 { diff --git a/lib/defs.go b/lib/defs.go index c3227eb..04072c8 100644 --- a/lib/defs.go +++ b/lib/defs.go @@ -4,6 +4,8 @@ package lib const ( // ExitSuccess is the successful exit status. + // + // It should be called on successful exit. ExitSuccess = 0 // ExitFailure is the failing exit status. diff --git a/lib/lib.go b/lib/lib.go index b717c7b..e59a98a 100644 --- a/lib/lib.go +++ b/lib/lib.go @@ -11,6 +11,8 @@ var progname = filepath.Base(os.Args[0]) // ProgName returns what lib thinks the program name is, namely the // basename of of argv0. +// +// It is similar to the Linux __progname. func ProgName() string { return progname }