Outils pour utilisateurs

Outils du site


kb:cheatsheet:openssl

CheatSheet

Verification d'un certificat

Vérification d'un CSR

# openssl req -text -noout -verify -in CSR.csr

Vérification d'une clé privée RSA

# openssl rsa -in private.key -check

Verification d'une clé privée EC

# openssl ec -in private.key -check

Vérification d'un certificat

# openssl x509 -in certificate.crt -text -noout

Vérification d'un fichier PKCS#12 (.pfx ou .p12)

# openssl pkcs12 -info -in cert.p12

Vérification d'un certificat distant (avec SNI)

# openssl s_client -showcerts -servername $FQDN_du_VHOST -connect $IP_ou_FQDN_du_server:port 2>/dev/null | openssl x509 -text

ou si starttls :

# openssl s_client -showcerts -connect $IP_ou_FQDN_du_server:port -starttls smtp 2>/dev/null | openssl x509 -text

Génération d'un certificat auto-signé

# openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes

Sinon, vous pouvez créer votre CA avec Créer sa CA et signer ses certificats

kb/cheatsheet/openssl.txt · Dernière modification : 2019/12/21 18:08 de beu