Differences between revisions 1 and 9 (spanning 8 versions)
Revision 1 as of 2016-01-23 20:04:33
Size: 295
Editor: Kurgan
Comment:
Revision 9 as of 2023-08-31 11:30:29
Size: 1591
Editor: Kurgan
Comment:
Deletions are marked like this. Additions are marked like this.
Line 6: Line 6:
 * https:
  {{{
openssl s_client -CApath /etc/ssl/certs -connect www.qualcosa.it:443
}}}
Line 10: Line 15:

 * imap + TLS (porta 143)
  {{{
openssl s_client -CApath /etc/ssl/certs -connect mail.qualcosa.it:143 -starttls imap
}}}


 * pop3 + TLS (porta 110)
  {{{
openssl s_client -CApath /etc/ssl/certs -connect mail.qualcosa.it:110 -starttls pop3
}}}
Line 14: Line 31:

 * imaps (porta 993)
  {{{
openssl s_client -CApath /etc/ssl/certs -connect mail.qualcosa.it:imaps
}}}

 * pop3s (porta 995)
  {{{
openssl s_client -CApath /etc/ssl/certs -connect mail.qualcosa.it:pop3s
}}}



=== Cambiare la password a una chiave privata ===

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
}}}


=== Leggere i dati di un certificato ===

{{{
openssl x509 -text -noout -in file_certificato.crt
}}}

=== Leggere i dati di una CRL ===

{{{
openssl crl -inform PEM -text -noout -in pki/crl.pem
}}}

OpenSSL

Verifica se SSL (e/o TLS) funziona:

  • https:
    • openssl s_client  -CApath /etc/ssl/certs -connect www.qualcosa.it:443
  • smtp + TLS (porta 25)
    • openssl s_client  -CApath /etc/ssl/certs -connect mail.qualcosa.it:25 -starttls smtp
  • imap + TLS (porta 143)
    • openssl s_client  -CApath /etc/ssl/certs -connect mail.qualcosa.it:143 -starttls imap
  • pop3 + TLS (porta 110)
    • openssl s_client  -CApath /etc/ssl/certs -connect mail.qualcosa.it:110 -starttls pop3
  • smtps (porta 465)
    • openssl s_client -CApath /etc/ssl/certs -connect mail.qualcosa.it:smtps
  • imaps (porta 993)
    • openssl s_client -CApath /etc/ssl/certs -connect mail.qualcosa.it:imaps
  • pop3s (porta 995)
    • openssl s_client -CApath /etc/ssl/certs -connect mail.qualcosa.it:pop3s

Cambiare la password a una chiave privata

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

Leggere i dati di un certificato

openssl x509 -text -noout  -in file_certificato.crt 

Leggere i dati di una CRL

openssl crl -inform PEM -text -noout -in pki/crl.pem 

OpenSSL (last edited 2023-08-31 11:30:29 by Kurgan)