Skip to content

Commit aa016cd

Browse files
committed
python-m2crypto: don't reference SSLv2 functions if openssl is built without SSLv2 support
Fixes: http://autobuild.buildroot.net/results/018/0183ba8c9fccc87f9e72279c49c2fdc1a9fcb556/ The recent openssl security bump disabled SSLv2 support, but python-m2crypto was still referencing SSLv2 functions causing undefined symbols when the module was imported. Backport an upstream patch to only reference these symbols if openssl is built with SSLv2 support. Signed-off-by: Peter Korsgaard <[email protected]>
1 parent 1d916a5 commit aa016cd

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
From ac01b38302474920288c1a9eb63fd35fa8d1db5b Mon Sep 17 00:00:00 2001
2+
From: Bosse Klykken <[email protected]>
3+
Date: Tue, 17 Jul 2012 15:55:00 +0200
4+
Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20try=20to=20build=20with=20SSLv2?=
5+
=?UTF-8?q?=20when=20it=20is=20not=20available.?=
6+
MIME-Version: 1.0
7+
Content-Type: text/plain; charset=UTF-8
8+
Content-Transfer-Encoding: 8bit
9+
10+
The patch originally from http://stackoverflow.com/a/11072709/164233
11+
12+
Fixes #30
13+
14+
Signed-off-by: Peter Korsgaard <[email protected]>
15+
---
16+
SWIG/_ssl.i | 2 ++
17+
1 file changed, 2 insertions(+)
18+
19+
diff --git a/SWIG/_ssl.i b/SWIG/_ssl.i
20+
index 3f6bd61..89b1ad1 100644
21+
--- a/SWIG/_ssl.i
22+
+++ b/SWIG/_ssl.i
23+
@@ -52,8 +52,10 @@ extern const char *SSL_alert_desc_string(int);
24+
%rename(ssl_get_alert_desc_v) SSL_alert_desc_string_long;
25+
extern const char *SSL_alert_desc_string_long(int);
26+
27+
+#ifndef OPENSSL_NO_SSL2
28+
%rename(sslv2_method) SSLv2_method;
29+
extern SSL_METHOD *SSLv2_method(void);
30+
+#endif
31+
%rename(sslv3_method) SSLv3_method;
32+
extern SSL_METHOD *SSLv3_method(void);
33+
%rename(sslv23_method) SSLv23_method;
34+
--
35+
2.7.0
36+

0 commit comments

Comments
 (0)