Configuring Curl for Ssl

Curl Command to setup SSL in AEM 6.5

Resolved . The attribute need to be httpsHostname not httpsHostName . Lower case 'n' and not Upper case 'N'

Configure cURL to use default system cert store on Windows

OpenSSL does not support using the "CA certificate store" that Windows has on its own. If you want your curl build to use that cert store, you need to rebuild curl to use the schannel backend instead (aka "winssl"), which is the Windows native version that also uses the Windows cert store by default.

If you decide to keep using OpenSSL, you simple must provide CA certs in either a PEM file or a specially crafted directory as Windows doesn't provide its system store using that format you either have to get a suitable store from somewhere or figure out how to convert the Windows cert store to PEM format.

Update

Starting with libcurl 7.71.0, due to ship on June 24, 2020, it will get the ability to use the Windows CA cert store when built to use OpenSSL. You then need to use the CURLOPT_SSL_OPTIONS option and set the correct bit in the bitmask: CURLSSLOPT_NATIVE_CA.

How to check if PHP CURL SSL works

On the server side, php -i | grep openssl will tell you if SSL is enabled. If you want to test the SSL protocol, just use https:// in a curl request: curl https://your_server_name.



Related Topics



Leave a reply



Submit