Useful OpenSSL Commands
Overview
Some useful OpenSSL commands for working with certificates and keys.
Commands
Download certificate chain from server:
openssl s_client -showcerts -connect example.com:443 </dev/null | sed -n -e '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > example.pemInstalling CA certificate to trusted store (Linux):
sudo cp example.pem /usr/local/share/ca-certificates/sudo update-ca-certificatesRemove password from private key (from PEM):
openssl rsa -in key.pem -out key-out.pemConcatinate public and private key:
cat certificate.pem key.pem > combined.pem