diff options
author | Jean-Paul Calderone <exarkun@twistedmatrix.com> | 2012-03-09 15:04:04 -0800 |
---|---|---|
committer | Jean-Paul Calderone <exarkun@twistedmatrix.com> | 2012-03-09 15:04:04 -0800 |
commit | 15f3a8683af475c0fdd0ecddbaf6d3df5c1e8bf5 (patch) | |
tree | cbc3cbe26b35cac10872ab61ac55165105954236 /OpenSSL/ssl/context.c | |
parent | b587107276e8ff548ab8f65cf504bb4906f2fd83 (diff) | |
download | pyopenssl-15f3a8683af475c0fdd0ecddbaf6d3df5c1e8bf5.tar.gz |
Re-instate the OPENSSL_NO_SSL2 check; it is necessary for the case where SSLv2_method is not a defined symbol at all.
Diffstat (limited to 'OpenSSL/ssl/context.c')
-rw-r--r-- | OpenSSL/ssl/context.c | 5 |
1 files changed, 5 insertions, 0 deletions
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(); |