Curl Command to download remote certificate

Hi,

I have Apache running with the certificates installed.

I need a "unix curl" command to download and display remote server certificate.

Kindly help.

Note: Apache has ""SSLVerifyClient require" set in its configuration.

echo "HEAD / HTTP/1.0\n Host: example.com:443\n\n EOT\n" | openssl s_client -prexit -connect example.com:443

this will return the SSL cert of the web server.

That works, however I was looking for the same with the CURL command.

Appreciate your help.

So, can anyone help me with a cURL command for downloading a website certificate.