diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2014-01-23 19:47:59 -0800 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2014-01-23 19:47:59 -0800 |
commit | 99f9279ff2189c55940dfd70574c07ebbde40f9e (patch) | |
tree | 95d6c8a4f5cb8cbb43b070e54182aceb56d88c8f | |
parent | 46ffbfb98d8b531b0100195d53dbfc53bcd517f1 (diff) | |
parent | b495790a40a530c63b231fee9c5f21cae8a85648 (diff) | |
download | cryptography-99f9279ff2189c55940dfd70574c07ebbde40f9e.tar.gz cryptography-99f9279ff2189c55940dfd70574c07ebbde40f9e.tar.bz2 cryptography-99f9279ff2189c55940dfd70574c07ebbde40f9e.zip |
Merge pull request #322 from reaperhulk/windows-support
add platform check to set library names for linking on windows
-rw-r--r-- | .coveragerc | 1 | ||||
-rw-r--r-- | cryptography/hazmat/bindings/openssl/binding.py | 10 | ||||
-rw-r--r-- | docs/changelog.rst | 1 |
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 ~~~~~~~~~~~~~~~~ |