python-hyper / hyper

HTTP/2 for Python.
http://hyper.rtfd.org/en/latest/
MIT License
1.05k stars 191 forks source link

Delay SSL context construction in requests adapter #385

Open joguSD opened 6 years ago

joguSD commented 6 years ago

This delays SSL context construction in the requests adapter to only construct the new context when it will actually be used to establish a new connection. This avoids getting duplicate certificate errors like the following: ssl.SSLError: [X509: CERT_ALREADY_IN_HASH_TABLE] cert already in hash table (_ssl.c:2171).