I'd like to automate the following process with the openssl command:
- Open browser, go to https://www.google.com
- Inspect ssl cert
- Export it locally in DER format
I've been working along the lines of the following command (here wrapped in python):
local("echo -n | openssl s_client -connect google.com:443 -certform DER | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p'> /tmp/google.com.der")
but it doesn't give me what I expect.