aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/_cffi_src/build_openssl.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/_cffi_src/build_openssl.py b/src/_cffi_src/build_openssl.py
index 416e1b39..4d2d2c6f 100644
--- a/src/_cffi_src/build_openssl.py
+++ b/src/_cffi_src/build_openssl.py
@@ -19,9 +19,18 @@ def _get_openssl_libraries(platform):
os.environ.get("CRYPTOGRAPHY_OSX_NO_LINK_FLAGS")
)
elif platform == "win32":
+ windows_link_openssl110 = os.environ.get(
+ "CRYPTOGRAPHY_WINDOWS_LINK_OPENSSL110", None
+ )
if compiler_type() == "msvc":
- libs = ["libeay32", "ssleay32"]
+ if windows_link_openssl110 is not None:
+ # Link against the 1.1.0 names
+ libs = ["libssl", "libcrypto"]
+ else:
+ # Link against the 1.0.2 and lower names
+ libs = ["libeay32", "ssleay32"]
else:
+ # Support mingw, which behaves unix-like and prefixes "lib"
libs = ["ssl", "crypto"]
return libs + ["advapi32", "crypt32", "gdi32", "user32", "ws2_32"]
else: