For Windows,
If you want to use windows own "CA certificate", You need to rebuild curl to with schannel backend instead(aka "winssl"). It will access from windows cert store by default. Openssl does not support to use windows system certificate on its own(see this answer), and must specify the certificate in PEM format, or set the default certificate when building libcurl with parameter --with-ca-bundle
and --with-ca-path
.
For Linux,
According to the document:
If libcurl was built with NSS support, then depending on the OS
distribution, it is probably required to take some additional steps to
use the system-wide CA cert db. RedHat ships with an additional
module, libnsspem.so, which enables NSS to read the OpenSSL PEM CA
bundle.