[Python-Dev] socketmodule with SSL enabled

Andy Dustman adustman@comstar.net
Wed, 29 Mar 2000 19:57:06 -0500 (EST)


I had to make the following one-line change to socketmodule.c so that it
would link properly with openssl-0.9.4. In studying the openssl include
files, I found:

#define SSLeay_add_ssl_algorithms()   SSL_library_init()

SSL_library_init() seems to be the "correct" call nowadays. I don't know
why this isn't being picked up. I also don't know how well the module
works, other than it imports, but I sure would like to try it with
Zope/ZServer/Medusa...

-- 
andy dustman       |     programmer/analyst     |      comstar.net, inc.
telephone: 770.485.6025 / 706.549.7689 | icq: 32922760 | pgp: 0xc72f3f1d
"Therefore, sweet knights, if you may doubt your strength or courage, 
come no further, for death awaits you all, with nasty, big, pointy teeth!"

Index: socketmodule.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/socketmodule.c,v
retrieving revision 1.98
diff -c -r1.98 socketmodule.c
*** socketmodule.c      2000/03/24 20:56:56     1.98
--- socketmodule.c      2000/03/30 00:49:09
***************
*** 2384,2390 ****
                return;
  #ifdef USE_SSL
        SSL_load_error_strings();
!       SSLeay_add_ssl_algorithms();
        SSLErrorObject = PyErr_NewException("socket.sslerror", NULL, NULL);
        if (SSLErrorObject == NULL)
                return;
--- 2384,2390 ----
                return;
  #ifdef USE_SSL
        SSL_load_error_strings();
!       SSL_library_init();
        SSLErrorObject = PyErr_NewException("socket.sslerror", NULL, NULL);
        if (SSLErrorObject == NULL)
                return;