« Openssl cheatsheet » : différence entre les versions

De Linux Server Wiki
Aller à la navigation Aller à la recherche
(Page créée avec « =Conversion= ==PEM to DER== <pre>openssl x509 -outform der -in certificate.pem -out certificate.der</pre> ==PEM to PKCS#7/P7B== <pre>openssl crl2pkcs7 -nocrl -certfile c... »)
 
Ligne 15 : Ligne 15 :
==Convert P7B to PEM==
==Convert P7B to PEM==
<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=
* D'une clé secrète :
<pre>openssl rsa -noout -text -in <key file></pre>
* D'une requête :
<pre>openssl req -noout -text in <csr file></pre>
D'une clé publique :
<pre>openssl x509 -noout -text -in <crt/pem file></pre>

Version du 1 juillet 2017 à 18:26

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

  • D'une clé secrète :
openssl rsa -noout -text -in <key file>
  • D'une requête :
openssl req -noout -text in <csr file>

D'une clé publique :

openssl x509 -noout -text -in <crt/pem file>