mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
gh-94637: Release GIL in SSLContext.set_default_verify_paths (GH-94658)
(cherry picked from commit 78307c7dc2
)
Co-authored-by: Christian Heimes <christian@python.org>
This commit is contained in:
parent
7a341724e4
commit
a61870e196
2 changed files with 8 additions and 1 deletions
|
@ -0,0 +1,3 @@
|
|||
:meth:`SSLContext.set_default_verify_paths` now releases the GIL around
|
||||
``SSL_CTX_set_default_verify_paths`` call. The function call performs I/O
|
||||
and CPU intensive work.
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue