Mailing List Archive

socketmodule with SSL enabled
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;
Re: socketmodule with SSL enabled [ In reply to ]
> 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...

Strange -- the version of OpenSSL I have also calls itself 0.9.4
("OpenSSL 0.9.4 09 Aug 1999" to be precise) and doesn't have
SSL_library_init().

I wonder what gives...

--Guido van Rossum (home page: http://www.python.org/~guido/)
Re: socketmodule with SSL enabled [ In reply to ]
On Thu, 30 Mar 2000, Guido van Rossum wrote:

> > 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...
>
> Strange -- the version of OpenSSL I have also calls itself 0.9.4
> ("OpenSSL 0.9.4 09 Aug 1999" to be precise) and doesn't have
> SSL_library_init().
>
> I wonder what gives...

I don't know. Right after I made the patch, I found that 0.9.5 is
available, and I was able to successfully compile against that version
(with the patch).

--
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!"