Skip to content

Commit d472f49

Browse files
authored
Update Misc/NEWS.d/next/Security/2026-09-16-14-05-19.gh-issue-156793.Qa1T5Z.rst
1 parent 2c440e8 commit d472f49

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
:meth:`ssl.SSLContext.wrap_bio` now validates its *server_side*,
22
*server_hostname* and *session* arguments similar to
3-
:meth:`ssl.SSLContext.wrap_socket`.
3+
:meth:`ssl.SSLContext.wrap_socket`, but for backward compatiblity reasons
4+
emits :exc:`DeprecationWarning` instead of :exc:`ValueError`.
45

56
In particular, a context with :attr:`~ssl.SSLContext.check_hostname` enabled
6-
and no *server_hostname* passed to :meth:`!wrap_bio` now raises :exc:`ValueError`
7-
instead of completing a handshake that verified the certificate chain
8-
without verifying the peer's identity, with no indication that the
9-
check had been skipped.
7+
and no *server_hostname* passed to :meth:`!wrap_bio` now emits
8+
:exc:`DeprecationWarning` to indicate the hostname wasn't checked.
9+
(In Python 3.13 and later, this raises :exc:`ValueError`.)

0 commit comments

Comments
 (0)