openssl s_client -CApath /etc/ssl/certs -connect www.qualcosa.it:443
openssl s_client -CApath /etc/ssl/certs -connect mail.qualcosa.it:25 -starttls smtp
openssl s_client -CApath /etc/ssl/certs -connect mail.qualcosa.it:143 -starttls imap
openssl s_client -CApath /etc/ssl/certs -connect mail.qualcosa.it:110 -starttls pop3
openssl s_client -CApath /etc/ssl/certs -connect mail.qualcosa.it:smtps
openssl s_client -CApath /etc/ssl/certs -connect mail.qualcosa.it:imaps
openssl s_client -CApath /etc/ssl/certs -connect mail.qualcosa.it:pop3s
Qeusto comando legge una chiave (crittata o in chiaro, lo capisce da solo guardando dentro al file della chiave) e la critta con la password che scelgo, usando 3des oppure aes256
openssl rsa -des3 -in keyfile.key -out keyfile-with-new-password.key openssl rsa -aes256 -in keyfile.key -out keyfile-with-new-password.key
Questo comando decritta una chiave e la salva in chiaro:
openssl rsa -in infile.key -out outfile.key
openssl x509 -text -noout -in file_certificato.crt
openssl crl -inform PEM -text -noout -in pki/crl.pem
C'è un cliente che mi manda i certificati in un PFX. Questo è il metodo per estrarli, con tanto di opzione per accettare algoritmi obsoleti.
openssl pkcs12 -legacy -in nome-file.pfx -nocerts -out nome-file.key
openssl rsa -in nome-file.key -out nome-file-decrittata.key
openssl pkcs12 -legacy -in nome-file.pfx -nokeys -out nome-file.cert