I have setup a custom Magento Rest Api at the endpoint: "https://domain-name.de/rest/V1/wawi". This Api just returns a simple json string. Have tested my Api with Postman application -> works fine.
The problem occurs, when I test it in PHP script:
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://domain-name.de/rest/V1/wawi",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_SSL_VERIFYPEER => 0,
CURLOPT_SSL_VERIFYHOST => 0,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"p\":\"test\"}",
CURLOPT_HTTPHEADER => array(
"cache-control: no-cache",
"content-type: application/json",
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
RESULT:
cURL Error #:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
Any ideas on how to solve this issue ?
EDIT Just checked my magento server is using "OpenSSL 1.0.1e-fips 11 Feb 2013 openssl version number: 268439647" and my client is using "OpenSSL 1.0.1k 8 Jan 2015 openssl version number: 268439743"