c - How can i use wget in order to obtain the public key? -


is there way use wget directly or tweak source code or use openssl in order obtain public key certificate , save file?

not wget, openssl, can use same method in question ldap (except on port 443, if you're interested in https, presumably).

you can pipe output openssl x509 -pubkey public key itself.

something should do:

echo -n | openssl s_client -connect www.google.com:443 | sed -ne '/-begin certificate-/,/-end certificate-/p' | openssl x509 -pubkey -noout 

Comments