Skip to content

Commit 3125c32

Browse files
committed
Send client cert when using InsecureHTTPAdapter
1 parent d985479 commit 3125c32

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

news/7207.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix not sending client certificates when using ``--trusted-host``.

src/pip/_internal/network/session.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,9 @@ def close(self):
212212
class InsecureHTTPAdapter(HTTPAdapter):
213213

214214
def cert_verify(self, conn, url, verify, cert):
215-
conn.cert_reqs = 'CERT_NONE'
216-
conn.ca_certs = None
215+
super(InsecureHTTPAdapter, self).cert_verify(
216+
conn=conn, url=url, verify=False, cert=cert
217+
)
217218

218219

219220
class PipSession(requests.Session):

0 commit comments

Comments
 (0)