Skip to content

Commit f1b59ed

Browse files
committed
whatsnew/3.13: add note for disabling VERIFY_X509_STRICT
1 parent 792383a commit f1b59ed

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Doc/whatsnew/3.13.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,16 @@ Other Language Changes
127127
* The :func:`ssl.create_default_context` API now includes
128128
:data:`ssl.VERIFY_X509_PARTIAL_CHAIN` and :data:`ssl.VERIFY_X509_STRICT`
129129
in its default flags.
130+
131+
.. note::
132+
133+
:data:`ssl.VERIFY_X509_STRICT` may reject pre-:rfc:`5280` or malformed
134+
certificates that the underlying OpenSSL implementation otherwise would
135+
accept. While disabling this is not recommended, you can do so using::
136+
137+
ctx = ssl.create_default_context()
138+
ctx.verify_flags &= ~ssl.VERIFY_X509_STRICT
139+
130140
(Contributed by William Woodruff in :gh:`112389`.)
131141

132142
New Modules

0 commit comments

Comments
 (0)