cURL error 35 - Unknown SSL protocol error in connection to api.rkd.reuters.com:443

I had this problem, and I fixed it by setting the curl SSL version to version 3

curl_setopt($ch, CURLOPT_SSLVERSION,3);

Apparently the server started requiring SSL version 3, and this setting caused cURL with SSL to start working again.


I had the same problem, unfortunately with a host unwilling to upgrade to php 5.5.

I solved it by creating a new class extending php's SoapClient to use cURL:

/**
 * New SoapClient class.
 * This extends php's SoapClient,
 * overriding __doRequest to use cURL to send the SOAP request.
 */
class SoapClientCurl extends SoapClient {

  public function __doRequest($request, $location, $action, $version, $one_way = NULL) {
$soap_request = $request;
$header = array(
  'Content-type: application/soap+xml; charset=utf-8',
  "Accept: text/xml",
  "Cache-Control: no-cache",
  "Pragma: no-cache",
  "SOAPAction: \"$action\"",
  "Content-length: " . strlen($soap_request),
);
$soap_do = curl_init();
$url = $location;
$options = array(
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HEADER => FALSE,
  //CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_SSL_VERIFYHOST => 0,
  CURLOPT_SSL_VERIFYPEER => FALSE,
  CURLOPT_RETURNTRANSFER => TRUE,
  //CURLOPT_USERAGENT => 'Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)',
  CURLOPT_VERBOSE => true,
  CURLOPT_POST => TRUE,
  CURLOPT_URL => $url,
  CURLOPT_POSTFIELDS => $soap_request,
  CURLOPT_HTTPHEADER => $header,
  CURLOPT_FAILONERROR => TRUE,
  CURLOPT_SSLVERSION => 3,
);

curl_setopt_array($soap_do, $options);
$output = curl_exec($soap_do);
if ($output === FALSE) {
  $err = 'Curl error: ' . curl_error($soap_do);
}
else {
  ///Operation completed successfully
}
curl_close($soap_do);

// Uncomment the following line to let the parent handle the request.
//return parent::__doRequest($request, $location, $action, $version);
return $output;
  }

}