diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-03-26 19:32:24 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-03-26 19:32:24 (GMT) |
commit | 5f1c38f06bbb0da07492334c5aa2e26dc9142661 (patch) | |
tree | 070b2df9f5af896f1b8269c323022094e7dcf418 /Modules | |
parent | 027e478f3f47e46b484690a878faaa36efcc3058 (diff) | |
download | cpython-5f1c38f06bbb0da07492334c5aa2e26dc9142661.zip cpython-5f1c38f06bbb0da07492334c5aa2e26dc9142661.tar.gz cpython-5f1c38f06bbb0da07492334c5aa2e26dc9142661.tar.bz2 |
Merged revisions 79448 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r79448 | antoine.pitrou | 2010-03-26 20:27:16 +0100 (ven., 26 mars 2010) | 6 lines
Issue #8222: Enable the SSL_MODE_AUTO_RETRY flag on SSL sockets, so that blocking
reads and writes are always retried by OpenSSL itself.
(this is a followup to issue #3890)
........
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_ssl.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c index a6c3eb8..66fd626 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -9,8 +9,6 @@ directly. XXX should partial writes be enabled, SSL_MODE_ENABLE_PARTIAL_WRITE? - - XXX what about SSL_MODE_AUTO_RETRY? */ #include "Python.h" @@ -371,6 +369,7 @@ newPySSLObject(PySocketSockObject *Sock, char *key_file, char *cert_file, self->ssl = SSL_new(self->ctx); /* New ssl struct */ PySSL_END_ALLOW_THREADS SSL_set_fd(self->ssl, Sock->sock_fd); /* Set the socket for SSL */ + SSL_set_mode(self->ssl, SSL_MODE_AUTO_RETRY); /* If the socket is in non-blocking mode or timeout mode, set the BIO * to non-blocking mode (blocking is the default) |