Openssl
De Linuxmemo.
(Différences entre les versions)
Ligne 23 : | Ligne 23 : | ||
voir info | voir info | ||
openssl x509 -text -in testcertif.pem -noout | openssl x509 -text -in testcertif.pem -noout | ||
+ | |||
+ | |||
+ | ==OCSP== | ||
+ | openssl s_client -connect wikipedia.org:443 2>&1 < /dev/null | sed -n '/-----BEGIN/,/-----END/p' | ||
+ | openssl s_client -connect wikipedia.org:443 2>&1 < /dev/null | sed -n '/-----BEGIN/,/-----END/p' > wikipedia.pem | ||
+ | |||
+ | Now, check if this certificate has an OCSP URI: | ||
+ | openssl x509 -noout -ocsp_uri -in wikipedia.pem | ||
+ | http://ocsp.digicert.com |
Version du 16 septembre 2019 à 09:17
Voir: Certutil, Openssl, Certificats
https://www.madboa.com/geek/openssl/
https://www.goconqr.com/mindmap/8704000/pki
Générons une clé privée de 2048 bits pour la CA
openssl genrsa -out ca.key 2048
Creation de la CA
openssl req -new -x509 -key ca.key -out ca.crt -days 1095
Générons une clé privée de 2048 bits pour test
openssl genrsa -out test.key 2048
Générez la clé publique avec l'ordre pour test
openssl req -new -key test.key -out test.csr
Création du certificat auto-signé
openssl x509 -req -in test.csr -out testcertif.pem -CA ca.crt -CAkey ca.key -CAcreateserial -CAserial ca.srl -days 90
voir info
openssl x509 -text -in testcertif.pem -noout
OCSP
openssl s_client -connect wikipedia.org:443 2>&1 < /dev/null | sed -n '/-----BEGIN/,/-----END/p' openssl s_client -connect wikipedia.org:443 2>&1 < /dev/null | sed -n '/-----BEGIN/,/-----END/p' > wikipedia.pem
Now, check if this certificate has an OCSP URI:
openssl x509 -noout -ocsp_uri -in wikipedia.pem http://ocsp.digicert.com