summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorchgnrdv <52372310+chgnrdv@users.noreply.github.com>2022-06-22 10:10:22 (GMT)
committerGitHub <noreply@github.com>2022-06-22 10:10:22 (GMT)
commitdc8e1d0390e16e90b2f74f6bd6417324a357bc23 (patch)
treea8effa9ffc46798c2b28b5dc73982a3dc6794d31 /Modules
parentfda4b2f06364ae5ef91ecd9c09e2af380c8b0b4c (diff)
downloadcpython-dc8e1d0390e16e90b2f74f6bd6417324a357bc23.zip
cpython-dc8e1d0390e16e90b2f74f6bd6417324a357bc23.tar.gz
cpython-dc8e1d0390e16e90b2f74f6bd6417324a357bc23.tar.bz2
gh-94101 Disallow instantiation of SSLSession objects (GH-94102)
Fixes #94101 Automerge-Triggered-By: GH:tiran
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 e67ab42..0859657 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,
};