Skip to content

Commit 0878967

Browse files
committed
Merge remote-tracking branch 'mainline-ce/develop' into new-PAT
2 parents 0fbaa52 + 1ddce31 commit 0878967

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

lib/internal/Magento/Framework/HTTP/Adapter/Curl.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ class Curl implements \Zend_Http_Client_Adapter_Interface
2727
| CURLPROTO_FTPS
2828
),
2929
'verifypeer' => true,
30-
'verifyhost' => 2,
31-
'sslversion' => 6
30+
'verifyhost' => 2
3231
];
3332

3433
/**

lib/internal/Magento/Framework/HTTP/Client/Curl.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
*/
1414
class Curl implements \Magento\Framework\HTTP\ClientInterface
1515
{
16-
const SSL_VERSION = 6;
17-
1816
/**
1917
* Max supported protocol by curl CURL_SSLVERSION_TLSv1_2
2018
* @var int
@@ -122,7 +120,7 @@ public function setTimeout($value)
122120
/**
123121
* @param int|null $sslVersion
124122
*/
125-
public function __construct($sslVersion = self::SSL_VERSION)
123+
public function __construct($sslVersion = null)
126124
{
127125
$this->sslVersion = $sslVersion;
128126
}
@@ -383,7 +381,9 @@ protected function makeRequest($method, $uri, $params = [])
383381

384382
$this->curlOption(CURLOPT_RETURNTRANSFER, 1);
385383
$this->curlOption(CURLOPT_HEADERFUNCTION, [$this, 'parseHeaders']);
386-
$this->curlOption(CURLOPT_SSLVERSION, $this->sslVersion);
384+
if ($this->sslVersion !== null) {
385+
$this->curlOption(CURLOPT_SSLVERSION, $this->sslVersion);
386+
}
387387

388388
if (count($this->_curlUserOptions)) {
389389
foreach ($this->_curlUserOptions as $k => $v) {

0 commit comments

Comments
 (0)