aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cryptography/hazmat/bindings/openssl/binding.py5
1 files changed, 4 insertions, 1 deletions
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)