diff Modules/_ssl.c @ 60461:a1628bd97bb6 legacy-trunk

SSL_MODE_AUTO_RETRY has been added in OpenSSL 0.9.6. Fix compilation with earlier versions.
author Antoine Pitrou <solipsis@pitrou.net>
date Fri, 09 Apr 2010 20:38:39 +0000
parents 664173984f2d
children 49919b31ff20
line wrap: on
line diff
--- a/Modules/_ssl.c	Thu Apr 08 17:40:54 2010 +0000
+++ b/Modules/_ssl.c	Fri Apr 09 20:38:39 2010 +0000
@@ -368,7 +368,9 @@
 	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)