To display the contents of a PEM formatted certificate:

$ openssl x509 -in -text

Connecting to the server:

$ openssl s_client -showcerts -connect < /dev/null

Test smtp 587:

$ openssl s_client -host -port 587 -starttls smtp -crlf

Checking the Validity Date:

$ openssl s_client -showcerts -connect 2>/dev/null | openssl x509 -noout -dates

Encode base64 a file:

$ openssl enc -base64 -in file.txt -out file.txt.enc

if no ssl: python -m base64 -d

Create pair of keys (self signed certificate):

$ openssl req -x509 -newkey rsa:4096 -sha256 -nodes -keyout example.key -out example.crt -subj "/" -days 3650

Test speed of signatures:

$ openssl speed sha256 sha512

Change pass-phrase of a key, you will need to specify the old pass-phrase and then spedify a new one:

$ openssl rsa -des3 -in example.key -out

🔗encrypt / decrypt


$ openssl aes-256-cbc -a -salt -in file.txt -out file.txt.enc


$ openssl aes-256-cbc -d -a -in file.txt.enc -out file.txt