aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2016-03-19 11:17:24 -0400
committerAlex Gaynor <alex.gaynor@gmail.com>2016-03-19 11:17:24 -0400
commit3ee4fc78271a73468ec4d2f7aaf3d712a4828d6d (patch)
treee8d07feaecde01e09f80b280b35687dfcafc8248 /tests/hazmat
parent9912033a145c45a75c7fe9d7a27132f33370ee67 (diff)
downloadcryptography-3ee4fc78271a73468ec4d2f7aaf3d712a4828d6d.tar.gz
cryptography-3ee4fc78271a73468ec4d2f7aaf3d712a4828d6d.tar.bz2
cryptography-3ee4fc78271a73468ec4d2f7aaf3d712a4828d6d.zip
test for verify_openssl_version
Diffstat (limited to 'tests/hazmat')
-rw-r--r--tests/hazmat/bindings/test_openssl.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/hazmat/bindings/test_openssl.py b/tests/hazmat/bindings/test_openssl.py
index 457799d3..6b6b7474 100644
--- a/tests/hazmat/bindings/test_openssl.py
+++ b/tests/hazmat/bindings/test_openssl.py
@@ -8,7 +8,7 @@ import pytest
from cryptography.exceptions import InternalError
from cryptography.hazmat.bindings.openssl.binding import (
- Binding, _OpenSSLErrorWithText, _openssl_assert
+ Binding, _OpenSSLErrorWithText, _openssl_assert, _verify_openssl_version
)
@@ -175,3 +175,10 @@ class TestOpenSSL(object):
b'ex:data not multiple of block length'
)
)]
+
+ def test_verify_openssl_version(self, monkeypatch):
+ monkeypatch.delenv("CRYPTOGRAPHY_ALLOW_OPENSSL_098", raising=False)
+ # TODO: what exception type?
+ with pytest.raises(Exception):
+ # OpenSSL 0.9.8zg
+ _verify_openssl_version(0x9081DF)