Skip to content

Commit c1cedb9

Browse files
committed
Added support fot TLS v1.2 for setups with libcurl <7.35 for RestGateway
1 parent f520a01 commit c1cedb9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Message/AbstractRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ public function sendData($data)
315315
{
316316
$url = $this->getEndpoint().'?'.http_build_query($data, '', '&');
317317
$httpRequest = $this->httpClient->get($url);
318-
$httpRequest->getCurlOptions()->set(CURLOPT_SSLVERSION, 6); // CURL_SSLVERSION_TLSv1_2
318+
$httpRequest->getCurlOptions()->set(CURLOPT_SSLVERSION, 6); // CURL_SSLVERSION_TLSv1_2 for libcurl < 7.35
319319
$httpResponse = $httpRequest->send();
320320

321321
return $this->createResponse($httpResponse->getBody());

src/Message/AbstractRestRequest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ function ($event) {
163163
// echo "Data == " . json_encode($data) . "\n";
164164

165165
try {
166+
$httpRequest->getCurlOptions()->set(CURLOPT_SSLVERSION, 6); // CURL_SSLVERSION_TLSv1_2 for libcurl < 7.35
166167
$httpResponse = $httpRequest->send();
167168
return $this->response = $this->createResponse($httpResponse->json(), $httpResponse->getStatusCode());
168169
} catch (\Exception $e) {

0 commit comments

Comments
 (0)