summaryrefslogtreecommitdiffstats
path: root/Modules/_ssl.c
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-04-09 20:47:00 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-04-09 20:47:00 (GMT)
commitd59ceb5b7c9cd6f0ea049ec953977a6f0aebc565 (patch)
tree3770f38b48d45654f5cb28cabfb0d7037367d9f3 /Modules/_ssl.c
parent639e18410eed06bd89795dab5a89ce421e007309 (diff)
downloadcpython-d59ceb5b7c9cd6f0ea049ec953977a6f0aebc565.zip
cpython-d59ceb5b7c9cd6f0ea049ec953977a6f0aebc565.tar.gz
cpython-d59ceb5b7c9cd6f0ea049ec953977a6f0aebc565.tar.bz2
Merged revisions 79912 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ................ r79912 | antoine.pitrou | 2010-04-09 22:42:09 +0200 (ven., 09 avril 2010) | 10 lines Merged revisions 79910 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r79910 | antoine.pitrou | 2010-04-09 22:38:39 +0200 (ven., 09 avril 2010) | 4 lines SSL_MODE_AUTO_RETRY has been added in OpenSSL 0.9.6. Fix compilation with earlier versions. ........ ................
Diffstat (limited to 'Modules/_ssl.c')
-rw-r--r--Modules/_ssl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
index 9131158..3cec4b4 100644
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -369,7 +369,9 @@ 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 */
+#ifdef SSL_MODE_AUTO_RETRY
SSL_set_mode(self->ssl, SSL_MODE_AUTO_RETRY);
+#endif
/* If the socket is in non-blocking mode or timeout mode, set the BIO
* to non-blocking mode (blocking is the default)