There doesn't seem to be any sort of standard naming convention for OpenSSL certificates, so I'd like to know if there's a simple command to get important information about any OpenSSL certificate, regardless of type. I'd like to know at least the certificate type (x509, RSA, DSA) and whether it's a public or private key. Looking at the contents of a certificate I just extracted from a PKCS12 file, neither of these are explicitly shown.
How to determine certificate type from file
certificateopenssl
Best Answer
Firstly, you have a few terminology problems:
So, if you're examining a PKCS#12 file (typically .p12 extension), then you already know:
All you don't know is whether those certificate & private key are RSA or DSA. You can check this by extracting the certificate(s), and then examine them:
The text output of the
openssl x509
command should include aSubject Public Key
section, which will include fields that let you see if it's an RSA or DSA key (along with the key size).