[Python-Dev] Re: Problem with SSL and socketmodule on Debian Potato?

Moshe Zadka moshez@zadka.site.co.il
Fri, 13 Apr 2001 19:20:42 +0300


On Fri, 13 Apr 2001, "Martin v. Loewis" <martin@loewis.home.cs.tu-berlin.de> wrote:

> How about this patch? I've verified that it works with my OpenSSL
> installation (0.9.5a), and, by source code inspection, that it should
> work with versions back to 0.9.1c (ie. that OPENSSL_VERSION_NUMBER was
> always available through including <openssl/crypto.h>).
> 
> The logic about RAND_status being 0 if unknown might be flawed, but
> that won't hurt unless SSL support is actually used.

No, this seems like a worse cure then the cause...
Why not put the whole if (RAND_status()) thing under the ifdef?
It was only added in 2.1, so at least we would be no worse off then in 2.0
> 
> If this won't get into 2.1, I'll put it on SF.
> 
> Regards,
> Martin
> 
> Index: socketmodule.c
> ===================================================================
> RCS file: /cvsroot/python/python/dist/src/Modules/socketmodule.c,v
> retrieving revision 1.139
> diff -u -r1.139 socketmodule.c
> --- socketmodule.c	2001/03/18 17:11:56	1.139
> +++ socketmodule.c	2001/04/13 15:56:04
> @@ -195,6 +195,13 @@
>  #include "openssl/ssl.h"
>  #include "openssl/err.h"
>  #include "openssl/rand.h"
> +
> +#if OPENSSL_VERSION_NUMBER < 0x0090510fL
> +/* RAND_status was added in OpenSSL 0.9.5. If it is not available,
> +   we assume that seeding the RNG is necessary every time. */
> +#define RAND_status()	0
> +#endif
> +
>  #endif /* USE_SSL */
>  
>  #if defined(MS_WINDOWS) || defined(__BEOS__)
> 
> _______________________________________________
> Python-Dev mailing list
> Python-Dev@python.org
> http://mail.python.org/mailman/listinfo/python-dev
> 
> 
-- 
"I'll be ex-DPL soon anyway so I'm        |LUKE: Is Perl better than Python?
looking for someplace else to grab power."|YODA: No...no... no. Quicker,
   -- Wichert Akkerman (on debian-private)|      easier, more seductive.
For public key, finger moshez@debian.org  |http://www.{python,debian,gnu}.org