In my PayPal Pro payment page I use the cURL function curl_setopt_array(
) with the following option : cUIn CURLOPT_CAINFO => dirname(__FILE__) . '/cacert.pem'.
Works fine, however even after some research I don't understand what exactly is cacert.pem
for. I don't understand the concept of "verification against" that is mentioned everywhere. And what is the relationship between this file and the .csr/.crt
certificate I bought to my provider?
The cacert. pem file is used to validate the Verify tenant server TLS certificate. It has a list of certificate authorities that are acceptable signers of the server certificate.
The cacerts file represents a system-wide keystore with CA certificates. System administrators can configure and manage that file using keytool, specifying jks as the keystore type. The cacerts keystore file ships with several root CA certificates. The initial password of the cacerts keystore file is changeit .
You have to put your certificate into /usr/share/ca-certificates folder instead of /usr/local/share/ca-certificates , and then append a line for your certificate into the configuration file /etc/ca-certificates.
The cacerts file is a collection of trusted certificate authority (CA) certificates. Oracle includes a cacerts file with its SSL support in the Java™ Secure Socket Extension (JSSE) tool kit and JDK. It contains certificate references for well-known Certificate authorities, such as VeriSign™.
cacert.pem is a bundle of CA certificates that you use to verify that the server is really the correct site you're talking to (when it presents its certificate in the SSL handshake). The bundle can be used by tools like curl or wget, as well as other TLS/SSL speaking software. The bundle should contain the certificates for the CAs you trust. This bundle is sometimes referred to as the "CA cert store".
Example:
curl --cacert cacert.pem https://example.com
In the curl project, there's a cacert.pem being provided that is converted from the ca certs Mozilla ships for Firefox.
It is done by the use of digital signatures. For the full explanation of what a CA (certificate authority) is, I refer to wikipedia.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With