aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.coveragerc1
-rw-r--r--cryptography/hazmat/bindings/openssl/binding.py10
-rw-r--r--docs/changelog.rst1
3 files changed, 11 insertions, 1 deletions
diff --git a/.coveragerc b/.coveragerc
index 20e3224e..03fc621e 100644
--- a/.coveragerc
+++ b/.coveragerc
@@ -3,5 +3,6 @@ branch = True
[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 4dedd816..1c17a5b2 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 @@ class Binding(object):
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"]
+
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):
diff --git a/docs/changelog.rst b/docs/changelog.rst
index 4b5a5be8..c8843821 100644
--- a/docs/changelog.rst
+++ b/docs/changelog.rst
@@ -10,6 +10,7 @@ Changelog
* Added initial :doc:`/hazmat/bindings/commoncrypto`.
* Removed ``register_cipher_adapter`` method from
:class:`~cryptography.hazmat.backends.interfaces.CipherBackend`.
+* Added support for the OpenSSL backend under Windows.
0.1 - 2014-01-08
~~~~~~~~~~~~~~~~