Skip to content

Commit

Permalink
http_ssl_verify_peer sets CURLOPT_SSL_VERIFYPEER correctly (#1686)
Browse files Browse the repository at this point in the history
Co-authored-by: Michi Hoffmann <cleptric@users.noreply.github.com>
  • Loading branch information
tanenbaum and cleptric authored Jan 22, 2024
1 parent 617dde3 commit 40ddd18
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/HttpClient/HttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ public function sendRequest(Request $request, Options $options): Response
curl_setopt($curlHandle, \CURLOPT_HTTP_VERSION, \CURL_HTTP_VERSION_1_1);

$httpSslVerifyPeer = $options->getHttpSslVerifyPeer();
if ($httpSslVerifyPeer) {
curl_setopt($curlHandle, \CURLOPT_SSL_VERIFYPEER, true);
if (!$httpSslVerifyPeer) {
curl_setopt($curlHandle, \CURLOPT_SSL_VERIFYPEER, false);
}

$httpProxy = $options->getHttpProxy();
Expand Down

0 comments on commit 40ddd18

Please sign in to comment.