Download an SSL certificate from a remote website through a proxy

8,480

There are various tools that can be used to make a connection to a remote system through a CONNECT proxy. I am not sure about the best one, but here are a couple examples connect-proxy corkscrew, proxychains, proxytunnel.

connect-proxy looks promising though. Apparently it offers you the option redirect to a local port instead of STDIN/STDOUT like most.

Here are some untested examples based on my reading of the connect-proxy man pages.

# example
connect -H proxyserver:port remoteserver:port -p localport
# so to open a local port 4430 to Google via a squid proxy at 10.1.1.1
connect -H 10.1.1.1:3128 www.google.com:443 -p 4430
Share:
8,480

Related videos on Youtube

avh
Author by

avh

Updated on September 18, 2022

Comments

  • avh
    avh over 1 year

    I want a script checking my server's certificate. There are very good answers around here how to get this with openssl s_client or gnutls-cli, which works fine.... but NOT if you are behind a proxy! Doh!

    I did not found a possibility to tell these tools to use a proxy. Openssl seems to have added the -proxy option some weeks ago (after 15 years!) but I cannot use this release because it's not yet available in my environment.

    I also cannot install some fancy non standard tunneling software like proxytunnel (which I would really like to).

    So is there ANY way to download a remote certificate from a web server with any standard tool like curl, wget, openssl or such?

    • Naveed Abbas
      Naveed Abbas about 7 years
      If you want "standard" and cannot install stuff then how about telling your OS/version, huh?
    • avh
      avh about 7 years
      It's a Debian. I don't know exactly which one because I have no direct access to the system.