Openssl

How to setup a self signed OpenSSL PKI

Retrieve the certificate from a server

1
2
3
openssl s_client -connect "SERVER:PORT" < /dev/null 2>/dev/null | openssl x509 -outform pem 2>/dev/null

openssl s_client -connect "SERVER:PORT" -starttls smtp < /dev/null 2>/dev/null | openssl x509 -outform pem 2>/dev/null