diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2022-07-09 16:33:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-09 16:33:15 (GMT) |
commit | a61870e19602f54a0579dd83edf334ba00ad92f6 (patch) | |
tree | 5efb7c8bb7184a0ce929d36a632a624c4b043e43 /Modules/_ssl.c | |
parent | 7a341724e4dc8188f01ac338deaa414c4e6542c4 (diff) | |
download | cpython-a61870e19602f54a0579dd83edf334ba00ad92f6.zip cpython-a61870e19602f54a0579dd83edf334ba00ad92f6.tar.gz cpython-a61870e19602f54a0579dd83edf334ba00ad92f6.tar.bz2 |
gh-94637: Release GIL in SSLContext.set_default_verify_paths (GH-94658)
(cherry picked from commit 78307c7dc2352b6633138466debd4c10fae32970)
Co-authored-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'Modules/_ssl.c')
-rw-r--r-- | Modules/_ssl.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c index 0859657..6d5c019 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -4305,7 +4305,11 @@ static PyObject * _ssl__SSLContext_set_default_verify_paths_impl(PySSLContext *self) /*[clinic end generated code: output=0bee74e6e09deaaa input=35f3408021463d74]*/ { - if (!SSL_CTX_set_default_verify_paths(self->ctx)) { + int rc; + Py_BEGIN_ALLOW_THREADS + rc = SSL_CTX_set_default_verify_paths(self->ctx); + Py_END_ALLOW_THREADS + if (!rc) { _setSSLError(get_state_ctx(self), NULL, 0, __FILE__, __LINE__); return NULL; } |