Skip to content

Instantly share code, notes, and snippets.

@almet
Created October 2, 2012 11:34
Show Gist options
  • Save almet/3818341 to your computer and use it in GitHub Desktop.
Save almet/3818341 to your computer and use it in GitHub Desktop.
Install M2Crypto

First, you need to download the sources of M2Crypto:

svn co http://svn.osafoundation.org/m2crypto/trunk m2crypto
patch SWIG/_ssl.i m2crypto-sslv2-error.diff

Once this is done, you just need to install it in the venv you want, or system-wide:

python setup.py install
--- SWIG/_ssl.i 2011-01-15 20:10:06.000000000 +0100
+++ SWIG/_ssl.i 2012-06-17 17:39:05.292769292 +0200
@@ -48,8 +48,10 @@
%rename(ssl_get_alert_desc_v) SSL_alert_desc_string_long;
extern const char *SSL_alert_desc_string_long(int);
+#ifndef OPENSSL_NO_SSL2
%rename(sslv2_method) SSLv2_method;
extern SSL_METHOD *SSLv2_method(void);
+#endif
%rename(sslv3_method) SSLv3_method;
extern SSL_METHOD *SSLv3_method(void);
%rename(sslv23_method) SSLv23_method;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment