]> granicus.if.org Git - python/commitdiff
Merged revisions 79910 via svnmerge from
authorAntoine Pitrou <solipsis@pitrou.net>
Fri, 9 Apr 2010 20:44:09 +0000 (20:44 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Fri, 9 Apr 2010 20:44:09 +0000 (20:44 +0000)
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.
........

Modules/_ssl.c

index e08a2db933744f96cf8355c925de3a290cf375b2..fd3b33ae5fc6f999c0ec164d9bf5785fb09dc159 100644 (file)
@@ -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)