Skip to content

Commit

Permalink
php-imagine#831 fixed error tls1.0 version
Browse files Browse the repository at this point in the history
  • Loading branch information
inazarov committed Jan 19, 2023
1 parent 7199860 commit 252c02f
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/File/Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,17 +264,6 @@ protected function setCurlOptions($curl)
if (!@curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true)) {
throw new RuntimeException('curl_setopt(CURLOPT_FOLLOWLOCATION) failed.');
}
if (defined('CURL_SSLVERSION_TLSv1_1')) {
if (!@curl_setopt($curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_1)) {
throw new RuntimeException('curl_setopt(CURLOPT_SSLVERSION) failed.');
}
} else {
// Manually checked that CURL_SSLVERSION_TLSv1_1 is 5 for any version of curl from 7.34.0 to 7.61.0
// See for example https://github.com/curl/curl/blob/curl-7_34_0/include/curl/curl.h#L1668
if (!@curl_setopt($curl, CURLOPT_SSLVERSION, 5)) {
throw new RuntimeException('curl_setopt(CURLOPT_SSLVERSION) failed.');
}
}
}

/**
Expand Down

0 comments on commit 252c02f

Please sign in to comment.