pete911 / certinfo

print x509 certificate info

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fails with PEM containing a private key

ssgelm opened this issue · comments

When running certinfo on a PEM file that starts with a key, I get the following output:

$ certinfo /etc/ssl/private/CERT.crt
--- [/etc/ssl/private/CERT.crt] ---
PRIVATE KEY type`

If I remove the private key from the file and run it again I get the remaining chain displayed properly.

hi @ssgelm yeah, this is just to parse certificates, do you think we should silently ignore private keys? (invalid certs)

@ssgelm this is now fixed in the v1.0.6 version. Let me know if it works for you and I'll close this issue.

Works perfectly, thanks! This is particularly useful for us to be able to check HAProxy cert files, which are required to have a private key in them.