PHP webservice connection occurring cURL ERROR: 35

1

Hello, I am trying to connect to a webservice that uses SSL security, requiring the use of a certificate. I was trying to initially on a linux server, but now I'm using it on my computer with windows and xampp. I've already tried connecting to the NuSOAP library and using PHP's SoapClient.

The error that is occurring is: HTTP Error: cURL ERROR: 35: Unknown SSL protocol error in connection to

Data: Apache / 2.4.17 (Win32) OpenSSL / 1.0.2d PHP / 5.6.21 CURL: 7.47.1 NuSOAP v 1.123 Library

Solution:

I solved my problems by changing two points of my connection:

  • First, I read in some places that it could be certificate problem. My certificate was with the private key and 3 certificates (begin certificate). I left the private key and the first certificate, removing the rest of the certificate chain.
  • Second, I saw that when setting up an SSL connection, the PHP timeout setting can be ignored, so you need to enter the "connection_timeout" parameter when making the SSL connection.
asked by anonymous 02.06.2016 / 04:40

1 answer

0

You can try changing cURL SSL settings for version 3:

curl_setopt($ch, CURLOPT_SSLVERSION,3);
    
02.06.2016 / 11:44