perl script for showing ssl certs

2019-08-28 22:13发布

问题:

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

回答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



回答2:

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



标签: perl ssl openssl