openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 3650
To omit the use of a passphrase on the private key, add the following flag
-nodes
SMTP
openssl s_client -connect smtp.exmaple.com:25 -starttls smtp
openssl s_client -connect smtp.exmaple.com:587 -starttls smtp
openssl s_client -connect smtp.exmaple.com:465 smtp
Show validity range of a cert
echo -n | openssl s_client -showcerts -connect wiki.rlskeels.com:443 | openssl x509 -noout -dates
Convert the p12
to a text file. You'll be prompted to enter a password to decrypt the whole p12
(if you have set no password, just press Enter without typing anything). You'll then be prompted to enter a password to encrypt the private key that's within the p12
file before it's exported as the txt
file.
openssl pkcs12 -in vpn-client.p12 -out vpn-client.txt
Convert the txt
file back to a p12
file with password protection.
openssl pkcs12 -export -in vpn-client.txt -out vpn-client.p12
To test a connection's cert
openssl s_client --connect wiki.rlskeels.com:443