I need integration of my company website with external web services which require Curl and TLS 1.2.
I enabled php_curl.dll and set curl.cainfo with the right pem file path on php.ini.
Now curl is working but only with TLS 1.0, even with CURLOPT_SSLVERSION option set to 6:
$c = curl_init();
curl_setopt($c, CURLOPT_URL, "https://www.howsmyssl.com/a/check");
curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
curl_setopt($c, CURLOPT_SSLVERSION, 6);
I'm working on a WAMP server with Apache 2.4, PHP 5.4.16 - MSVC9 - NTS - CGI/FastCGI.
Scrolling phpinfo() page, on section "PHP Variables" I see
_SERVER["SERVER_SOFTWARE"] Apache/2.4.10 (Win32) OpenSSL/1.0.1j mod_fcgid/2.3.9
_SERVER["SSL_VERSION_LIBRARY"] OpenSSL/1.0.1j
while on "openssl" section I see
OpenSSL Library Version OpenSSL 0.9.8y 5 Feb 2013
OpenSSL Header Version OpenSSL 0.9.8y 5 Feb 2013
and on "curl" section:
cURL support enabled
cURL Information 7.30.0
SSL Yes
SSL Version OpenSSL/0.9.8y
Can someone tell me why PHP is using OpenSSL 1.0.1j and Curl 0.9.8y?
How can I have Curl set on TLS 1.2 without upgrading PHP?