summaryrefslogtreecommitdiffstats
path: root/Modules/_ssl.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-12-06 03:11:33 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-12-06 03:11:33 (GMT)
commit22293df016773029385c70968252a11b7cb02a42 (patch)
tree5611857cbd58ca2989fddd38a43ed745ac9d30d0 /Modules/_ssl.c
parent4becc38ad15d4e066f1b141cada8f5d76797cae4 (diff)
parente32467cf6af3e6d113ae2cfd886e403828e23fed (diff)
downloadcpython-22293df016773029385c70968252a11b7cb02a42.zip
cpython-22293df016773029385c70968252a11b7cb02a42.tar.gz
cpython-22293df016773029385c70968252a11b7cb02a42.tar.bz2
merge 3.4 (#22935)
Diffstat (limited to 'Modules/_ssl.c')
-rw-r--r--Modules/_ssl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
index 29e7469..36e7739 100644
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -2132,8 +2132,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());
@@ -4454,8 +4456,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",