aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/hazmat/bindings/test_openssl.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/hazmat/bindings/test_openssl.py b/tests/hazmat/bindings/test_openssl.py
index 58d7602b..d22c4fd2 100644
--- a/tests/hazmat/bindings/test_openssl.py
+++ b/tests/hazmat/bindings/test_openssl.py
@@ -15,7 +15,9 @@ from __future__ import absolute_import, division, print_function
import pytest
-from cryptography.hazmat.bindings.openssl.binding import Binding
+from cryptography.hazmat.bindings.openssl.binding import (
+ Binding, _get_windows_libraries
+)
class TestOpenSSL(object):
@@ -137,3 +139,13 @@ class TestOpenSSL(object):
resp = b.lib.SSL_set_mode(ssl, b.lib.SSL_OP_ALL)
assert resp == b.lib.SSL_OP_ALL
assert b.lib.SSL_OP_ALL == b.lib.SSL_get_mode(ssl)
+
+ def test_windows_static_dynamic_libraries(self):
+ assert "ssleay32mt" in _get_windows_libraries("static")
+
+ assert "ssleay32mt" in _get_windows_libraries("")
+
+ assert "ssleay32" in _get_windows_libraries("dynamic")
+
+ with pytest.raises(ValueError):
+ _get_windows_libraries("notvalid")