mirror of https://github.com/cheat/cheat.git
openssl: move note about self-signed certificates up
commit b848b2a607
inserted additional commands to show certificate, which are related to the comment.
This commit is contained in:
parent
b848b2a607
commit
9f50f3b310
|
@ -7,14 +7,14 @@ openssl req -new -key server.key -out server.csr
|
||||||
# To sign a certificate using a private key and CSR:
|
# To sign a certificate using a private key and CSR:
|
||||||
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
|
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
|
||||||
|
|
||||||
|
# (The above commands may be run in sequence to generate a self-signed SSL certificate.)
|
||||||
|
|
||||||
# To show certificate information for a certificate signing request
|
# To show certificate information for a certificate signing request
|
||||||
openssl req -text -noout -in server.csr
|
openssl req -text -noout -in server.csr
|
||||||
|
|
||||||
# To show certificate information for generated certificate
|
# To show certificate information for generated certificate
|
||||||
openssl x509 -text -noout -in server.crt
|
openssl x509 -text -noout -in server.crt
|
||||||
|
|
||||||
# (The above commands may be run in sequence to generate a self-signed SSL certificate.)
|
|
||||||
|
|
||||||
# To view certificate expiration:
|
# To view certificate expiration:
|
||||||
echo | openssl s_client -connect <hostname>:443 2> /dev/null | \
|
echo | openssl s_client -connect <hostname>:443 2> /dev/null | \
|
||||||
awk '/-----BEGIN/,/END CERTIFICATE-----/' | \
|
awk '/-----BEGIN/,/END CERTIFICATE-----/' | \
|
||||||
|
|
Loading…
Reference in New Issue