How to use latest openssl library with pyOpenSSL?

I am currently using pyOpenssl and it uses openssl 1.0.1f, which is installed by the system. now I install openssl 1.0.1jfrom the source code and set the library path of the new version to LD_LIBRARY_PATH, at this time, when I run my py file, this will result in an error:

File "sslcert.py", line 5, in <module>
from OpenSSL import SSL, _util, crypto
...

File "/usr/local/lib/python2.7/dist-packages/cffi-0.8.6-py2.7-linux-x86_64.egg/cffi/vengine_cpy.py", line 149, in load_library
    raise ffiplatform.VerificationError(error)
cffi.ffiplatform.VerificationError:  
importing '/usr/local/lib/python2.7/dist-packages/cryptography-0.6.1-py2.7-linux-x86_64.egg/cryptography/_Cryptography_cffi_36a40ff0x2bad1bae.so':    
/usr/local/lib/python2.7/dist-packages/cryptography-0.6.1-py2.7-linux-x86_64.egg/cryptography/_Cryptography_cffi_36a40ff0x2bad1bae.so:  
symbol EC_GFp_nistp521_method, version OPENSSL_1.0.1 not defined in file libcrypto.so.1.0.0 with link time reference

I am interested in using the latest openssl library for pyOpenssl, how to solve this problem?

+4
source share
1 answer

You probably need to recompile cryptography against the newer version of OpenSSL.

, OpenSSL, (, , ) .

, virtualenv, .

+3

All Articles