From 92719c546ff24c8b133e09bc0ded108374b2eaec Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Fri, 9 Apr 2010 20:38:39 +0000 Subject: [PATCH] SSL_MODE_AUTO_RETRY has been added in OpenSSL 0.9.6. Fix compilation with earlier versions. --- Modules/_ssl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Modules/_ssl.c b/Modules/_ssl.c index 6befbefc9c..986ec460c6 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -368,7 +368,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) -- 2.50.1