Grabbing an SSL certificate from a remote server

There are moments when you need to inspect the certificate a remote server is presenting – maybe it’s expired and you’re trying to work out why things are breaking, or maybe you need the raw certificate data for some other reason and don’t have access to the server’s configuration. The quickest way is with openssl s_client: openssl s_client -connect {HOSTNAME}:{PORT} -showcerts Replace {HOSTNAME} with the server address and {PORT} with the port (usually 443 for HTTPS). The -showcerts flag dumps the full certificate chain rather than just the leaf certificate. ...

15 June 2021 · 1 min · 149 words · Shafiq Alibhai

'scripts/extract-cert.c:21:10: fatal error: openssl/bio.h: No such file or directory'

sudo apt-get install -y libssl-dev

19 September 2018 · 1 min · 5 words · Shafiq Alibhai