openssl s_client -connect some.https.server:443 -showcerts
is a nice command to run when you want to inspect the server's certificates and its certificate chain.
Is there a way to run this command when you are behind a HTTP/HTTPS proxy ?
I found that this is because OpenSSL doesn't go via the proxy unless you explicitly tell it with an explicit -proxy : openssl s_client -showcerts -connect "jvt.me:443" -proxy proxy.example.com:8888 ...
Description. The s_client command implements a generic SSL/TLS client which connects to a remote host using SSL/TLS . It is a very useful diagnostic tool for SSL servers.
Checks the validity of all certificates in the chain by attempting to look up valid CRLs. Normally if an unhandled critical extension is present which is not supported by OpenSSL the certificate is rejected (as required by RFC5280).
In the command line, enter openssl s_client -connect <hostname> : <port> . This opens an SSL connection to the specified hostname and port and prints the SSL certificate. Check the availability of the domain from the connection results. The following table includes some commonly used s_client commands.
You can use proxytunnel:
proxytunnel -p yourproxy:8080 -d www.google.com:443 -a 7000
and then you can do this:
openssl s_client -connect localhost:7000 -showcerts
Hope this can help you!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With