diff options
author | Christian Heimes <christian@python.org> | 2022-07-09 16:11:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-09 16:11:15 (GMT) |
commit | 78307c7dc2352b6633138466debd4c10fae32970 (patch) | |
tree | b46e6685c45595c97f3b99d42db7abcc7b0b2417 /Modules/_ssl.c | |
parent | 0fc8ac0b0db6c03182c5181475c7b0b2ff7ec11f (diff) | |
download | cpython-78307c7dc2352b6633138466debd4c10fae32970.zip cpython-78307c7dc2352b6633138466debd4c10fae32970.tar.gz cpython-78307c7dc2352b6633138466debd4c10fae32970.tar.bz2 |
gh-94637: Release GIL in SSLContext.set_default_verify_paths (GH-94658)
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 8ff15d1..78c02c1 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -4302,7 +4302,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; } |