Skip to content

Commit 08f2b9d

Browse files
miss-islingtonj178
andauthored
bpo-44389: Fix typo in ssl deprecation warning message (GH-26754)
`ssl.SSL_NO_TLS` should be `ssl.OP_NO_TLS`. (cherry picked from commit c544393) Co-authored-by: Joe <[email protected]>
1 parent c689e0a commit 08f2b9d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Lib/test/test_ssl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ def test_openssl111_deprecations(self):
609609
with self.assertWarns(DeprecationWarning) as cm:
610610
ctx.options |= option
611611
self.assertEqual(
612-
'ssl.OP_NO_SSL*/ssl.SSL_NO_TLS* options are deprecated',
612+
'ssl.OP_NO_SSL*/ssl.OP_NO_TLS* options are deprecated',
613613
str(cm.warning)
614614
)
615615

Modules/_ssl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3597,7 +3597,7 @@ set_options(PySSLContext *self, PyObject *arg, void *c)
35973597
set = ~opts & new_opts;
35983598

35993599
if ((set & opt_no) != 0) {
3600-
if (_ssl_deprecated("ssl.OP_NO_SSL*/ssl.SSL_NO_TLS* options are "
3600+
if (_ssl_deprecated("ssl.OP_NO_SSL*/ssl.OP_NO_TLS* options are "
36013601
"deprecated", 2) < 0) {
36023602
return -1;
36033603
}

0 commit comments

Comments
 (0)