aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/bindings/test_openssl.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/hazmat/bindings/test_openssl.py')
-rw-r--r--tests/hazmat/bindings/test_openssl.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/hazmat/bindings/test_openssl.py b/tests/hazmat/bindings/test_openssl.py
index 75a8e3f1..20171fa7 100644
--- a/tests/hazmat/bindings/test_openssl.py
+++ b/tests/hazmat/bindings/test_openssl.py
@@ -131,3 +131,21 @@ class TestOpenSSL(object):
expected_options = current_options | b.lib.SSL_OP_ALL
assert resp == expected_options
assert b.lib.SSL_get_mode(ssl) == expected_options
+
+ def test_conditional_removal(self):
+ b = Binding()
+ if b.lib.OPENSSL_VERSION_NUMBER >= 0x10000000:
+ assert b.lib.X509_V_ERR_DIFFERENT_CRL_SCOPE
+ assert b.lib.X509_V_ERR_CRL_PATH_VALIDATION_ERROR
+ else:
+ with pytest.raises(AttributeError):
+ b.lib.X509_V_ERR_DIFFERENT_CRL_SCOPE
+
+ with pytest.raises(AttributeError):
+ b.lib.X509_V_ERR_CRL_PATH_VALIDATION_ERROR
+
+ if b.lib.OPENSSL_VERSION_NUMBER >= 0x10001000:
+ assert b.lib.CMAC_Init
+ else:
+ with pytest.raises(AttributeError):
+ b.lib.CMAC_Init