PayPal TLS Test URL - PHP curl SSL protocol error -


i'm trying test against new paypal test endpoint: https://tlstest.paypal.com.

see bottom of page: tls 1.2 , http/1.1 upgrade microsite (verify your...).

i'm using php (5.3.28) , curl (7.30.0 - openssl/0.9.8y - libssh2/1.4.2) on windows server 2008 r2 , iis 7.5:

$ch = curl_init(); curl_setopt($ch, curlopt_url, 'https://tlstest.paypal.com'); curl_setopt($ch, curlopt_returntransfer, true); curl_setopt($ch, curlopt_failonerror, true); curl_setopt($ch, curlopt_sslversion, 6); // curl_sslversion_tlsv1_2 $result = curl_exec($ch); echo 'result = '.$result.'<br>'; echo 'errno = '.curl_errno($ch).'<br>'; echo 'error = '.curl_error($ch).'<br>'; curl_close($ch); 

i'm getting error:

35 unknown ssl protocol error in connection tlstest.paypal.com:443

i found this: github - unknown ssl protocol error in says:

openssl must @ 1.0.1 or higher tls 1.2.

is correct..?

my php openssl on version: openssl/0.9.8y (from phpinfo()).

if need openssl 1.0.1 or higher use tls 1.2 presumably every server running php lesser openssl version (i'm guessing that's lot!) unable use paypal api's or paypal ipn soon.

how update php openssl version on windows..?

i have working now. seems though @ least openssl/1.0.1i is required tls 1.2.

i upgraded php version 5.6.0, upgraded openssl version 1.0.1.

i needed these:

  1. use curl_setopt($ch, curlopt_ssl_verifypeer, true); verify certificate. default true of curl 7.10.
  2. save cacert.pem http://curl.haxx.se/docs/caextract.html locally (in case c:\cert), update php ini you're using reference cacert.pem as shown here. using ini file saves having use curl_setopt($ch, curlopt_cainfo, dirname(__file__) . '\cacert.pem'); in every call.

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -