From ab3093ffe7dcc058cbd1b22ecb32b715ca47d6d2 Mon Sep 17 00:00:00 2001 From: Adam Goodman Date: Wed, 9 Jul 2014 10:42:07 -0400 Subject: reorder libssl/libcrypto on linker command line --- cryptography/hazmat/bindings/openssl/binding.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cryptography/hazmat/bindings/openssl/binding.py b/cryptography/hazmat/bindings/openssl/binding.py index 4cd1b89b..372ee49e 100644 --- a/cryptography/hazmat/bindings/openssl/binding.py +++ b/cryptography/hazmat/bindings/openssl/binding.py @@ -96,7 +96,10 @@ class Binding(object): # OpenSSL goes by a different library name on different operating # systems. if sys.platform != "win32": - libraries = ["crypto", "ssl"] + # In some circumstances, the order in which these libs are specified + # on the linker command-line is significant; libssl must come before + # libcrypto (http://marc.info/?l=openssl-users&m=135361825921871) + libraries = ["ssl", "crypto"] else: # pragma: no cover link_type = os.environ.get("PYCA_WINDOWS_LINK_TYPE", "static") libraries = _get_windows_libraries(link_type) -- cgit v1.2.3