add library switch for windows support
Temporarily using pragma: no cover on it until we have windows coverage
on travis. Windows builds will be done via jenkins for now.
diff --git a/.coveragerc b/.coveragerc
index 20e3224..03fc621 100644
--- a/.coveragerc
+++ b/.coveragerc
@@ -3,5 +3,6 @@
[report]
exclude_lines =
+ pragma: no cover
@abc.abstractmethod
@abc.abstractproperty
diff --git a/cryptography/hazmat/bindings/openssl/binding.py b/cryptography/hazmat/bindings/openssl/binding.py
index 4dedd81..f30b551 100644
--- a/cryptography/hazmat/bindings/openssl/binding.py
+++ b/cryptography/hazmat/bindings/openssl/binding.py
@@ -13,6 +13,8 @@
from __future__ import absolute_import, division, print_function
+import sys
+
from cryptography.hazmat.bindings.utils import build_ffi
@@ -79,9 +81,15 @@
if cls.ffi is not None and cls.lib is not None:
return
+ # platform check to set the right library names
+ if sys.platform != "win32":
+ libraries = ["crypto", "ssl"]
+ else: # pragma: no cover
+ libraries = ["libeay32", "ssleay32", "advapi32"]
+
cls.ffi, cls.lib = build_ffi(cls._module_prefix, cls._modules,
_OSX_PRE_INCLUDE, _OSX_POST_INCLUDE,
- ["crypto", "ssl"])
+ libraries)
@classmethod
def is_available(cls):