(DC) Decode Private Key, Certificate or CSR?
Description
You can easily decode or view the non-encoded version of a Certificate, Certificate Signing Request (CSR), or Private Key using OpenSSL, use the following commands.
A decoded Private Key will only show you:
The key length
Modulus
PublicExponent
PrivateExponent
Encryption factors (prime1, prime2, exponent1, exponent2, and coefficient)
A decoded Certificate will provide you with:
Version
FQDN (CN or Common Name)
Serial number
Issuer information
Subject
Encryption factors (such as modulus, signature algorithm, keys, policies, etc..)
A decoded Certificate Signing Request (CSR) will show you
Version
Public Key size
FQDN (CN or Common Name)
Encryption factors (modulus, algorithm, and exponent)
openssl req -noout -text -in csr_file.csr
openssl in -noout -text -in key_file.key
openssl x509 -noout -text -in cert_file.cer