0

I would like to view the ssl certificate of 3rd party hosts using openssl, but openssl s_client doesn't support proxies (which I do have in my environment).

I'm hoping that I can use perl for doing the equivalent of this:

openssl s_client -showcerts -connect www.domain.com:443
Chris Snow
  • 23,813
  • 35
  • 144
  • 309
  • I have searched CPAN, and looked on various google posts, but most stuff was aimed at verifying certificates. This isn't what I'm trying to do. I'm trying to inspect the certificates and print them out. – Chris Snow Feb 08 '13 at 14:17

2 Answers2

1

You can patch openssl to accept proxys, see openssl patch and openssl s_client using a proxy

Community
  • 1
  • 1
Gilles Quénot
  • 173,512
  • 41
  • 224
  • 223
  • Hi Sputnick, I have seen that post. Unfortunately, I'm stuck with the version of openssl that is installed. :( – Chris Snow Feb 08 '13 at 14:23
1

You should search around dump_peer_certificate() method from Net::SSLeay module.

See http://www.perlmonks.org/?node_id=70620 and http://metacpan.org/pod/Net::SSLeay

szabgab
  • 6,202
  • 11
  • 50
  • 64
Gilles Quénot
  • 173,512
  • 41
  • 224
  • 223