Fails with PEM containing a private key
ssgelm opened this issue · comments
Stephen Gelman commented
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.
Peter Reisinger commented
hi @ssgelm yeah, this is just to parse certificates, do you think we should silently ignore private keys? (invalid certs)
Peter Reisinger commented
@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.
Stephen Gelman commented
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.