Skip to content

Commit e949138

Browse files
committed
CVE-2023-40217 Add in get_post_handsake_auth
1 parent 77545f0 commit e949138

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Modules/_ssl.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2334,8 +2334,10 @@ context_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
23342334
#endif
23352335

23362336
#ifdef TLS1_3_VERSION
2337-
self->post_handshake_auth = 0;
2338-
SSL_CTX_set_post_handshake_auth(self->ctx, self->post_handshake_auth);
2337+
{
2338+
self->post_handshake_auth = 0;
2339+
SSL_CTX_set_post_handshake_auth(self->ctx, self->post_handshake_auth);
2340+
}
23392341
#endif
23402342

23412343
return (PyObject *)self;
@@ -3575,6 +3577,13 @@ static PyGetSetDef context_getsetlist[] = {
35753577
#endif
35763578
{"verify_mode", (getter) get_verify_mode,
35773579
(setter) set_verify_mode, NULL},
3580+
{"post_handshake_auth", (getter) get_post_handshake_auth,
3581+
#ifdef TLS1_3_VERSION
3582+
(setter) set_post_handshake_auth,
3583+
#else
3584+
NULL,
3585+
#endif
3586+
},
35783587
{NULL}, /* sentinel */
35793588
};
35803589

0 commit comments

Comments
 (0)