pyca/cryptography — pull request #1282 by akgood (2014-07-23 19:14:28+00:00)
Title: Reorder OpenSSL libraries on the linker command-line

I had some issues getting cryptography to work with static versions of libssl and libcrypto, along the lines of:

cffi.ffiplatform.VerificationError: importing '/path/to/cryptography-0.5.1/cryptography/hazmat/bindings/__pycache__/_Cryptography_cffi_79a5b0a3x3a8a382.so': /path/to/cryptography-0.5.1/cryptography/hazmat/bindings/__pycache__/_Cryptography_cffi_79a5b0a3x3a8a382.so: undefined symbol: SRP_Calc_A

It turns out that swapping the order of "-lcrypto" and "-lssl" in the link command resolved this. Apparently, this is a known issue in some dark corners of the internet (e.g. http://marc.info/?l=openssl-users&m=135361825921871)