diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-12-06 02:59:35 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-12-06 02:59:35 (GMT) |
commit | e32467cf6af3e6d113ae2cfd886e403828e23fed (patch) | |
tree | 2e6c2e4a1423c91746cb46503aa73073bdc28b07 /Modules | |
parent | 81f01fb104683fdfd099b78e5b7b1793a36458c3 (diff) | |
download | cpython-e32467cf6af3e6d113ae2cfd886e403828e23fed.zip cpython-e32467cf6af3e6d113ae2cfd886e403828e23fed.tar.gz cpython-e32467cf6af3e6d113ae2cfd886e403828e23fed.tar.bz2 |
allow ssl module to compile if openssl doesn't support SSL 3 (closes #22935)
Patch by Kurt Roeckx.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_ssl.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c index 90bca98..17beaf8 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -2016,8 +2016,10 @@ context_new(PyTypeObject *type, PyObject *args, PyObject *kwds) else if (proto_version == PY_SSL_VERSION_TLS1_2) ctx = SSL_CTX_new(TLSv1_2_method()); #endif +#ifndef OPENSSL_NO_SSL3 else if (proto_version == PY_SSL_VERSION_SSL3) ctx = SSL_CTX_new(SSLv3_method()); +#endif #ifndef OPENSSL_NO_SSL2 else if (proto_version == PY_SSL_VERSION_SSL2) ctx = SSL_CTX_new(SSLv2_method()); @@ -4065,8 +4067,10 @@ PyInit__ssl(void) PyModule_AddIntConstant(m, "PROTOCOL_SSLv2", PY_SSL_VERSION_SSL2); #endif +#ifndef OPENSSL_NO_SSL3 PyModule_AddIntConstant(m, "PROTOCOL_SSLv3", PY_SSL_VERSION_SSL3); +#endif PyModule_AddIntConstant(m, "PROTOCOL_SSLv23", PY_SSL_VERSION_SSL23); PyModule_AddIntConstant(m, "PROTOCOL_TLSv1", |