Certdump handles DER certificates as well now.

This commit is contained in:
Kyle Isom
2015-12-23 13:23:59 -08:00
parent 0b493e1060
commit 14bf511195
3 changed files with 9 additions and 2 deletions

View File

@@ -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 {