Skip to content
Myr

Fix `verify=False`, `cert=...` case. (#3442)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tom Christie · committed by GitHub · parent 8ecb86f · Browse files · 2 files+7 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+7 added−4 removed

  • other:+7 added−4 removed

2 files+7 added−4 removed

modified:httpx/_config.py+3 added-4 removed
37 unmodified lines
38 else:39 # Default case...40 ctx = ssl.create_default_context(cafile=certifi.where())41 elif verify is False:42 ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)43 ssl_context.check_hostname = False44 ssl_context.verify_mode = ssl.CERT_NONE45 return ssl_context42 ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)43 ctx.check_hostname = False44 ctx.verify_mode = ssl.CERT_NONE45 elif isinstance(verify, str): # pragma: nocover46 message = (47 "`verify=<str>` is deprecated. "48 "Use `verify=ssl.create_default_context(cafile=...)` "
200 unmodified lines
modified:CHANGELOG.md+4 added
2 unmodified lines
3All notable changes to this project will be documented in this file.45The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).67## Dev89* Fix SSL case where `verify=False` together with client side certificates.10 11## 0.28.0 (28th November, 2024)1213The 0.28 release includes a limited set of deprecations.14
1116 unmodified lines