Quantcast
Channel: How do I automate exporting a DER encoded certificate for a site? - Server Fault
Viewing all articles
Browse latest Browse all 3

Answer by Celada for How do I automate exporting a DER encoded certificate for a site?

$
0
0

Your sed command is only capturing openssl s_client's standard output, but the certificate comes with the other debugging information on standard error. Have you tried something like this?

openssl s_client -connect google.com:443 </dev/null 2>&1 |  sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' |  openssl x509 -outform DER >/tmp/google.com.der

Viewing all articles
Browse latest Browse all 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>