Libcurl faq (https://github.com/mikeduglas/libcurl)

Q. a SSL site throws errors when trying to connect.

A1. Don’t verify the authenticity:

  curl.SetSSLVerifyPeer(FALSE)  !- Don't verify the authenticity of the peer's certificate.
  curl.SetSSLVerifyHost(FALSE)  !- the connection succeeds regardless of the names in the certificate.

A2. Download the Mozilla CA certificate store PEM file from here and call this:

  curl.SetCAInfo('cacert.pem')
  curl.SetSSLVerifyPeer(TRUE)  !- not necessary, it is default option
  curl.SetSSLVerifyHost(TRUE)  !- not necessary, it is default option

Thanks to Arnor Baldvinsson for sharing.

1 Like