bpo-44389: Fix typo in ssl deprecation warning message (GH-26754)

`ssl.SSL_NO_TLS` should be `ssl.OP_NO_TLS`.
This commit is contained in:
Joe 2021-06-17 17:39:57 +08:00 committed by GitHub
parent 7247f6f433
commit c544393b89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -605,7 +605,7 @@ def test_openssl111_deprecations(self):
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)
)

View 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;
}