Skip to content

Commit

Permalink
fix(curl): Set PROXY_CAINFO curlopt with CAINFO, fixes HTTPS proxies
Browse files Browse the repository at this point in the history
See discussion from: #6 (comment)

Co-Authored-By: coletdjnz <coletdjnz@proton.me>
  • Loading branch information
rlaphoenix and coletdjnz committed Apr 1, 2024
1 parent 418e452 commit 6344d03
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions curl_cffi/curl.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,8 @@ def _ensure_cacert(self) -> None:
if not self._is_cert_set:
ret = self.setopt(CurlOpt.CAINFO, self._cacert)
self._check_error(ret, "set cacert")
ret = self.setopt(CurlOpt.PROXY_CAINFO, self._cacert)
self._check_error(ret, "set proxy cacert")

def perform(self, clear_headers: bool = True) -> None:
"""Wrapper for ``curl_easy_perform``, performs a curl request.
Expand Down

0 comments on commit 6344d03

Please sign in to comment.