OpenSSL: Difference between revisions
Jump to navigation
Jump to search
Anthoanthop (talk | contribs) No edit summary |
Anthoanthop (talk | contribs) No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
== Generate a self-signed certificate without passphrase in one line == | == Generate a self-signed certificate without passphrase in one line == | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
openssl req -nodes -new -x509 -keyout server.key -out server.cert -days 3650 | openssl req -nodes -new -x509 -keyout server.key -out server.cert -days 3650 | ||
</syntaxhighlight> | |||
== Getting the expiration time of an SMTP certificate == | |||
<syntaxhighlight lang="bash"> | |||
SERVERNAME=mail.example.com | |||
printf 'quit\n' | openssl s_client -connect $SERVERNAME:587 -starttls smtp | openssl x509 -enddate -noout | |||
</syntaxhighlight> | </syntaxhighlight> |
Latest revision as of 15:15, 3 January 2018
Generate a self-signed certificate without passphrase in one line
openssl req -nodes -new -x509 -keyout server.key -out server.cert -days 3650
Getting the expiration time of an SMTP certificate
SERVERNAME=mail.example.com
printf 'quit\n' | openssl s_client -connect $SERVERNAME:587 -starttls smtp | openssl x509 -enddate -noout