diff --git a/lib/internal/Magento/Framework/HTTP/Client/Curl.php b/lib/internal/Magento/Framework/HTTP/Client/Curl.php index 136f9924933512b5e64f83e27b6b825e8a2590ca..5ebc92abf70d9063af63683f5f530dd01470865a 100644 --- a/lib/internal/Magento/Framework/HTTP/Client/Curl.php +++ b/lib/internal/Magento/Framework/HTTP/Client/Curl.php @@ -122,7 +122,7 @@ class Curl implements \Magento\Framework\HTTP\ClientInterface /** * @param int|null $sslVersion */ - public function __construct($sslVersion = null) + public function __construct($sslVersion = self::SSL_VERSION) { $this->sslVersion = $sslVersion; } @@ -383,7 +383,7 @@ class Curl implements \Magento\Framework\HTTP\ClientInterface $this->curlOption(CURLOPT_RETURNTRANSFER, 1); $this->curlOption(CURLOPT_HEADERFUNCTION, [$this, 'parseHeaders']); - $this->setSSLVersion($this->sslVersion); + $this->curlOption(CURLOPT_SSLVERSION, $this->sslVersion); if (count($this->_curlUserOptions)) { foreach ($this->_curlUserOptions as $k => $v) { @@ -496,19 +496,4 @@ class Curl implements \Magento\Framework\HTTP\ClientInterface { $this->_curlUserOptions[$name] = $value; } - - /** - * Set ssl version to specified version or default - * - * @param int $sslVersion - * @return void - */ - private function setSSLVersion($sslVersion) - { - if ($sslVersion) { - $this->sslVersion = $sslVersion; - } else { - $this->sslVersion = self::SSL_VERSION; - } - } }