Re-instate the OPENSSL_NO_SSL2 check; it is necessary for the case where SSLv2_method is not a defined symbol at all.
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 @@
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();