summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-06-22 10:50:03 (GMT)
committerGitHub <noreply@github.com>2022-06-22 10:50:03 (GMT)
commit2e8eac1c2d4bc6fdbd4309e7558a3b6e767ba280 (patch)
tree104d37daf75784cfc1ba3a14d9e07d466e81d1ea /Modules
parente51a22b6f667474be615e313db3de86c4c664b32 (diff)
downloadcpython-2e8eac1c2d4bc6fdbd4309e7558a3b6e767ba280.zip
cpython-2e8eac1c2d4bc6fdbd4309e7558a3b6e767ba280.tar.gz
cpython-2e8eac1c2d4bc6fdbd4309e7558a3b6e767ba280.tar.bz2
gh-94101 Disallow instantiation of SSLSession objects (GH-94102)
Fixes GH-94101 Automerge-Triggered-By: GH:tiran (cherry picked from commit dc8e1d0390e16e90b2f74f6bd6417324a357bc23) Co-authored-by: chgnrdv <52372310+chgnrdv@users.noreply.github.com>
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_ssl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
index af25204..c8500c5 100644
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -5067,7 +5067,8 @@ static PyType_Spec PySSLSession_spec = {
.name = "_ssl.SSLSession",
.basicsize = sizeof(PySSLSession),
.flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
- Py_TPFLAGS_IMMUTABLETYPE),
+ Py_TPFLAGS_IMMUTABLETYPE |
+ Py_TPFLAGS_DISALLOW_INSTANTIATION),
.slots = PySSLSession_slots,
};