Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

openssl s_client using a proxy

Tags:

openssl

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 ?

like image 983
pushNpop Avatar asked Jul 10 '10 18:07

pushNpop


People also ask

Does OpenSSL use 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 ...

What is s_client?

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.

What does OpenSSL verify do?

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).

How do I connect to OpenSSL?

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.


1 Answers

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!

like image 102
Francesco Carlucci Avatar answered Sep 16 '22 14:09

Francesco Carlucci