diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2019-02-21 09:52:10 +0800 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2019-02-20 20:52:10 -0500 |
commit | 5cfaa5b79d446e1c63de3948e7558cd00561ea1f (patch) | |
tree | 75cbee0953f498757b8758f76b439f897c40d9e5 /tests | |
parent | 20a441870be8dce22cb9cc2046b3c6cb3736e629 (diff) | |
download | cryptography-5cfaa5b79d446e1c63de3948e7558cd00561ea1f.tar.gz cryptography-5cfaa5b79d446e1c63de3948e7558cd00561ea1f.tar.bz2 cryptography-5cfaa5b79d446e1c63de3948e7558cd00561ea1f.zip |
encode the package version in the shared object (#4756)
* encode the package version in the shared object
* review feedback
* move into build_ffi so the symbol is in all shared objects
* review feedback
Diffstat (limited to 'tests')
-rw-r--r-- | tests/hazmat/bindings/test_openssl.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/hazmat/bindings/test_openssl.py b/tests/hazmat/bindings/test_openssl.py index fb1e62fa..29a1c459 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, _consume_errors, _openssl_assert + Binding, _consume_errors, _openssl_assert, _verify_package_version ) @@ -118,3 +118,7 @@ class TestOpenSSL(object): ) b._register_osrandom_engine() assert _consume_errors(b.lib) == [] + + def test_version_mismatch(self): + with pytest.raises(ImportError): + _verify_package_version("nottherightversion") |