OpenSSL is a cryptography toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) network protocols and related cryptography standards required by them.

# To check an SSL connection:
openssl s_client -connect domain:port

# To generate new private key and CSR:
openssl req -out path/to/CSR.csr -new -newkey rsa:2048 -nodes -keyout path/to/pivate.key

# To sign a certificate using a private key and CSR:
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt

# To read contents of a private key:
openssl rsa -check -in path/to/pivate.key

# To verify a CSR file:
openssl req -text -noout -verify -in path/to/CSR.csr

# To check MD5 hash of a certificate:
openssl x509 -noout -modulus -in path/to/certificate.crt | openssl md5

# To check MD5 hash of a private key:
openssl rsa -noout -modulus -in path/to/pivate.key | openssl md5

# To check MD5 hash of a CSR file:
openssl req -noout -modulus -in path/to/CSR.csr | openssl md5

# To view certificate expiration:
echo | openssl s_client -connect <hostname>:443 2> /dev/null | \
awk '/-----BEGIN/,/END CERTIFICATE-----/' | \
openssl x509 -noout -enddate