/
python-2.6.8-ssl.patch
48 lines (46 loc) · 2.12 KB
/
python-2.6.8-ssl.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
diff -Naur Python-2.6.8.orig/Lib/ssl.py Python-2.6.8/Lib/ssl.py
--- Python-2.6.8.orig/Lib/ssl.py 2012-04-10 17:32:06.000000000 +0200
+++ Python-2.6.8/Lib/ssl.py 2014-01-20 16:17:30.000000000 +0100
@@ -61,7 +61,7 @@
from _ssl import SSLError
from _ssl import CERT_NONE, CERT_OPTIONAL, CERT_REQUIRED
-from _ssl import PROTOCOL_SSLv2, PROTOCOL_SSLv3, PROTOCOL_SSLv23, PROTOCOL_TLSv1
+from _ssl import PROTOCOL_SSLv3, PROTOCOL_SSLv23, PROTOCOL_TLSv1
from _ssl import RAND_status, RAND_egd, RAND_add
from _ssl import \
SSL_ERROR_ZERO_RETURN, \
@@ -406,8 +406,8 @@
return "TLSv1"
elif protocol_code == PROTOCOL_SSLv23:
return "SSLv23"
- elif protocol_code == PROTOCOL_SSLv2:
- return "SSLv2"
+ #elif protocol_code == PROTOCOL_SSLv2:
+ # return "SSLv2"
elif protocol_code == PROTOCOL_SSLv3:
return "SSLv3"
else:
diff -Naur Python-2.6.8.orig/Modules/_ssl.c Python-2.6.8/Modules/_ssl.c
--- Python-2.6.8.orig/Modules/_ssl.c 2012-04-10 17:32:09.000000000 +0200
+++ Python-2.6.8/Modules/_ssl.c 2014-01-20 16:16:54.000000000 +0100
@@ -302,8 +302,8 @@
self->ctx = SSL_CTX_new(TLSv1_method()); /* Set up context */
else if (proto_version == PY_SSL_VERSION_SSL3)
self->ctx = SSL_CTX_new(SSLv3_method()); /* Set up context */
- else if (proto_version == PY_SSL_VERSION_SSL2)
- self->ctx = SSL_CTX_new(SSLv2_method()); /* Set up context */
+/* else if (proto_version == PY_SSL_VERSION_SSL2)
+ self->ctx = SSL_CTX_new(SSLv2_method());*/ /* Set up context */
else if (proto_version == PY_SSL_VERSION_SSL23)
self->ctx = SSL_CTX_new(SSLv23_method()); /* Set up context */
PySSL_END_ALLOW_THREADS
@@ -1688,8 +1688,8 @@
PY_SSL_CERT_REQUIRED);
/* protocol versions */
- PyModule_AddIntConstant(m, "PROTOCOL_SSLv2",
- PY_SSL_VERSION_SSL2);
+/* PyModule_AddIntConstant(m, "PROTOCOL_SSLv2",
+ PY_SSL_VERSION_SSL2);*/
PyModule_AddIntConstant(m, "PROTOCOL_SSLv3",
PY_SSL_VERSION_SSL3);
PyModule_AddIntConstant(m, "PROTOCOL_SSLv23",