« Openssl cheatsheet » : différence entre les versions
Aller à la navigation
Aller à la recherche
m (→Validity) |
|||
Ligne 16 : | Ligne 16 : | ||
<pre>openssl pkcs7 -print_certs -in certificate.p7b -out certificate.pem</pre> | <pre>openssl pkcs7 -print_certs -in certificate.p7b -out certificate.pem</pre> | ||
=Validity / Information= | =Validity / Information on a key= | ||
* | * Private key : | ||
<pre>openssl rsa -noout -text -in <key file></pre> | <pre>openssl rsa -noout -text -in <key file></pre> | ||
* | * Signing request : | ||
<pre>openssl req -noout -text in <csr file></pre> | <pre>openssl req -noout -text in <csr file></pre> | ||
* | * Public key : | ||
<pre>openssl x509 -noout -text -in <crt/pem file></pre> | <pre>openssl x509 -noout -text -in <crt/pem file></pre> |
Version du 1 juillet 2017 à 17:28
Conversion
PEM to DER
openssl x509 -outform der -in certificate.pem -out certificate.der
PEM to PKCS#7/P7B
openssl crl2pkcs7 -nocrl -certfile certificate.pem -out certificate.p7b
PEM to PKCS#12/PFX
openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.crt -certfile CACert.crt
DER to PEM
openssl x509 -inform der -in certificate.cer -out certificate.pem
Convert P7B to PEM
openssl pkcs7 -print_certs -in certificate.p7b -out certificate.pem
Validity / Information on a key
- Private key :
openssl rsa -noout -text -in <key file>
- Signing request :
openssl req -noout -text in <csr file>
- Public key :
openssl x509 -noout -text -in <crt/pem file>