From 15f3a8683af475c0fdd0ecddbaf6d3df5c1e8bf5 Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone Date: Fri, 9 Mar 2012 15:04:04 -0800 Subject: Re-instate the OPENSSL_NO_SSL2 check; it is necessary for the case where SSLv2_method is not a defined symbol at all. --- OpenSSL/ssl/context.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OpenSSL/ssl/context.c b/OpenSSL/ssl/context.c index 534d207..e971c0a 100644 --- a/OpenSSL/ssl/context.c +++ b/OpenSSL/ssl/context.c @@ -1246,7 +1246,12 @@ ssl_Context_init(ssl_ContextObj *self, int i_method) { switch (i_method) { case ssl_SSLv2_METHOD: +#ifdef OPENSSL_NO_SSL2 + PyErr_SetString(PyExc_ValueError, "SSLv2_METHOD not supported by this version of OpenSSL"); + return NULL; +#else method = SSLv2_method(); +#endif break; case ssl_SSLv23_METHOD: method = SSLv23_method(); -- cgit v1.2.1