mirror of
https://github.com/python/cpython.git
synced 2025-08-19 08:11:46 +00:00
[3.12] gh-126455: Disallow _ssl.SSLSocket instantiation (GH-126481) (#126487)
gh-126455: Disallow _ssl.SSLSocket instantiation (GH-126481)
Prevent creation of incomplete/invalid _ssl.SSLSocket objects when
created directly.
(cherry picked from commit b1c4ffc205
)
Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
7a4262b064
commit
e6fd40ba18
1 changed files with 1 additions and 1 deletions
|
@ -2900,7 +2900,7 @@ static PyType_Spec PySSLSocket_spec = {
|
||||||
.name = "_ssl._SSLSocket",
|
.name = "_ssl._SSLSocket",
|
||||||
.basicsize = sizeof(PySSLSocket),
|
.basicsize = sizeof(PySSLSocket),
|
||||||
.flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_IMMUTABLETYPE |
|
.flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_IMMUTABLETYPE |
|
||||||
Py_TPFLAGS_HAVE_GC),
|
Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_DISALLOW_INSTANTIATION),
|
||||||
.slots = PySSLSocket_slots,
|
.slots = PySSLSocket_slots,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue