Reputation:
M2Crypto provides EC support for ECDSA/ECDH. I have installed OpenSSL 0.9.8i which contains support for EC. However when I run "from M2Crypto import EC,BIO" I get error saying EC_init() failed. So I added debug to print m2.OPENSSL_VERSION_TEXT value. It gets printed as "OpenSSL 0.9.7 19 Feb 2003". This version of OpenSSL doesnot support EC.
I tried "python setup.py build build_ext --openssl="new_path where OpenSSL 0.9.8i is installed". Though M2Crypto is built again "Python setup.py install" , I still see that it points to "Old version of OpenSSL".
Any Pointers on how to successfully get M2Crypto to use 0.9.8i will be useful.
Upvotes: 2
Views: 997
Reputation: 2786
Please file a problem report at https://gitlab.com/m2crypto/m2crypto/issues/new and your OS, version of Python, locations and versions of all OpenSSL libraries on your system, version of your compiler, and please attach complete stdout/stderr of the python setup.py clean build install
command. Thank you.
Upvotes: 0
Reputation: 31150
Some Linux distros, for example Fedora and Redhat, disable EC due to patent concerns.
If you build OpenSSL yourself, there are a few options you may need to specify for build_ext in addition to --openssl: --library-dirs and --include-dirs. See for example the m2crypto Makefile in Chandler. Also the M2Crypto FAQ has an answer for this.
Upvotes: 2
Reputation: 47682
Possibly its looking up shared libs libssl.so and libcrypto.so and finding the old ones in /usr/lib if you add the new_path to the top of /etc/ld.so.conf so it gets searched first it would work. But this might break other OpenSSL applications expecting old OpenSSL.
Upvotes: 0