1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2024-11-02 01:18:00 +01:00
tldr/pages/common/openssl.md
2016-02-09 20:58:44 -08:00

23 lines
755 B
Markdown

# openssl
> OpenSSL cryptographic toolkit.
- Generate a 2048bit RSA private key and save it to a file:
`openssl genrsa -out {{filename.key}} 2048`
- Generate a certificate signing request to be sent to a certificate authority:
`openssl req -new -sha256 -key {{filename.key}} -out {{filename.csr}}`
- Generate a self-signed certificate from a certificate signing request valid for some number of days:
`openssl x509 -req -days {{days}} -in {{filename.csr}} -signkey {{filename.key}} -out {{filename.crt}}`
- Display the certificate presented by an SSL/TLS server:
`openssl s_client -connect {{host}}:{{port}} </dev/null`
- Display the complete certificate chain of an HTTPS server:
`openssl s_client -connect {{host}}:443 -showcerts </dev/null`