curl https://example.com -w "%{certs}" -o /dev/null > cert.pem