]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-44389: Fix typo in ssl deprecation warning message (GH-26754)
authorJoe <nigelchiang@outlook.com>
Thu, 17 Jun 2021 09:39:57 +0000 (17:39 +0800)
committerGitHub <noreply@github.com>
Thu, 17 Jun 2021 09:39:57 +0000 (02:39 -0700)
`ssl.SSL_NO_TLS` should be `ssl.OP_NO_TLS`.

Lib/test/test_ssl.py
Modules/_ssl.c

index 6cea0ee9f1da53f97a527fe68deeef1ee1b9d76a..cee97a83020b8d38258180ebcd822ec27658c1bc 100644 (file)
@@ -605,7 +605,7 @@ class BasicSocketTests(unittest.TestCase):
                 with self.assertWarns(DeprecationWarning) as cm:
                     ctx.options |= option
                 self.assertEqual(
-                    'ssl.OP_NO_SSL*/ssl.SSL_NO_TLS* options are deprecated',
+                    'ssl.OP_NO_SSL*/ssl.OP_NO_TLS* options are deprecated',
                     str(cm.warning)
                 )
 
index 26f31f8f4c5341784ed76967e70aaa73bb804c8b..ad5269d7b07b63e7510c4756ae218e66f539cb8f 100644 (file)
@@ -3597,7 +3597,7 @@ set_options(PySSLContext *self, PyObject *arg, void *c)
     set = ~opts & new_opts;
 
     if ((set & opt_no) != 0) {
-        if (_ssl_deprecated("ssl.OP_NO_SSL*/ssl.SSL_NO_TLS* options are "
+        if (_ssl_deprecated("ssl.OP_NO_SSL*/ssl.OP_NO_TLS* options are "
                             "deprecated", 2) < 0) {
             return -1;
         }