how to download the ssl certificate from a website?

In order to download the certificate, you need to use the client built into openssl like so: echo -n | openssl s_client -connect $HOST:$PORTNUMBER -servername $SERVERNAME \ | openssl x509 > /tmp/$SERVERNAME.cert That will save the certificate to /tmp/$SERVERNAME.cert. The -servername is used to select the correct certificate when multiple are presented, in the case … Read more

How to fix: fatal error: openssl/opensslv.h: No such file or directory in RedHat 7

To fix this problem, you have to install OpenSSL development package, which is available in standard repositories of all modern Linux distributions. To install OpenSSL development package on Debian, Ubuntu or their derivatives: To install OpenSSL development package on Fedora, CentOS or RHEL: Edit : As @isapir has pointed out, for Fedora version>=22 use the DNF … Read more

Getting error in Curl – Peer certificate cannot be authenticated with known CA certificates

I am getting the below error while making ssl connection with self signed certificate. “Peer certificate cannot be authenticated with known CA certificates” It is working fine with CA signed certificate. I am setting the below using curl_easy_setopt(). curl_easy_setopt(MyContext, CURLOPT_CAPATH, CA_CERTIFICATE_PATH) curl_easy_setopt(MyContext, CURLOPT_SSL_VERIFYPEER,TRUE); The curl versionlibcurl-7.19.7-26 Openssl version is 0_9_8u. Please let me know how … Read more