Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
20d60803
Commit
20d60803
authored
Jan 17, 2013
by
Stefan Krah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #16982: Fix --without-threads build failure.
parent
6a56b8ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
Modules/_ssl.c
Modules/_ssl.c
+9
-3
No files found.
Modules/_ssl.c
View file @
20d60803
...
...
@@ -2392,15 +2392,17 @@ _servername_callback(SSL *s, int *al, void *args)
PyObject
*
result
;
/* The high-level ssl.SSLSocket object */
PyObject
*
ssl_socket
;
PyGILState_STATE
gstate
;
const
char
*
servername
=
SSL_get_servername
(
s
,
TLSEXT_NAMETYPE_host_name
);
gstate
=
PyGILState_Ensure
();
#ifdef WITH_THREAD
PyGILState_STATE
gstate
=
PyGILState_Ensure
();
#endif
if
(
ssl_ctx
->
set_hostname
==
NULL
)
{
/* remove race condition in this the call back while if removing the
* callback is in progress */
#ifdef WITH_THREAD
PyGILState_Release
(
gstate
);
#endif
return
SSL_TLSEXT_ERR_OK
;
}
...
...
@@ -2449,14 +2451,18 @@ _servername_callback(SSL *s, int *al, void *args)
Py_DECREF
(
result
);
}
#ifdef WITH_THREAD
PyGILState_Release
(
gstate
);
#endif
return
ret
;
error:
Py_DECREF
(
ssl_socket
);
*
al
=
SSL_AD_INTERNAL_ERROR
;
ret
=
SSL_TLSEXT_ERR_ALERT_FATAL
;
#ifdef WITH_THREAD
PyGILState_Release
(
gstate
);
#endif
return
ret
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment