diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2016-07-11 17:03:13 -0400 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2016-07-11 21:03:13 +0000 |
commit | 3e3444fa96a3fa911e99e1c12f1a0d859563ce2c (patch) | |
tree | 0e31161fc63ceb82586c9fcd37851c77a41731a5 /tests/test_x509_crlbuilder.py | |
parent | dbb64bd2a4a63f6071b1ac982b96d5d07bbd8a63 (diff) | |
download | cryptography-3e3444fa96a3fa911e99e1c12f1a0d859563ce2c.tar.gz cryptography-3e3444fa96a3fa911e99e1c12f1a0d859563ce2c.tar.bz2 cryptography-3e3444fa96a3fa911e99e1c12f1a0d859563ce2c.zip |
Use a series of constants for OpenSSL version checks (#3037)
* Use a series of constants for OpenSSL version checks.
N.B. I removed several qualifiers that were being used to express beta vs. release in OpenSSL version numbers. Reviewers please look closely!
* Convert some python as well, also add the file
* flake8
* Simplify code, remove functionality that can be expressed more simply
* clean up the tests as well
* more constants
* wrap long lines
* reflect feedback
* unused
* add this back?
Diffstat (limited to 'tests/test_x509_crlbuilder.py')
-rw-r--r-- | tests/test_x509_crlbuilder.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_x509_crlbuilder.py b/tests/test_x509_crlbuilder.py index 32a07487..96311ee6 100644 --- a/tests/test_x509_crlbuilder.py +++ b/tests/test_x509_crlbuilder.py @@ -309,7 +309,7 @@ class TestCertificateRevocationListBuilder(object): @pytest.mark.requires_backend_interface(interface=DSABackend) @pytest.mark.requires_backend_interface(interface=X509Backend) def test_sign_dsa_key(self, backend): - if backend._lib.OPENSSL_VERSION_NUMBER < 0x10001000: + if backend._lib.CRYPTOGRAPHY_OPENSSL_LESS_THAN_101: pytest.skip("Requires a newer OpenSSL. Must be >= 1.0.1") private_key = DSA_KEY_2048.private_key(backend) invalidity_date = x509.InvalidityDate( @@ -355,7 +355,7 @@ class TestCertificateRevocationListBuilder(object): @pytest.mark.requires_backend_interface(interface=EllipticCurveBackend) @pytest.mark.requires_backend_interface(interface=X509Backend) def test_sign_ec_key_unsupported(self, backend): - if backend._lib.OPENSSL_VERSION_NUMBER < 0x10001000: + if backend._lib.CRYPTOGRAPHY_OPENSSL_LESS_THAN_101: pytest.skip("Requires a newer OpenSSL. Must be >= 1.0.1") _skip_curve_unsupported(backend, ec.SECP256R1()) private_key = ec.generate_private_key(ec.SECP256R1(), backend) |