diff options
| author | Alex Gaynor <alex.gaynor@gmail.com> | 2015-06-18 07:17:30 -0400 | 
|---|---|---|
| committer | Alex Gaynor <alex.gaynor@gmail.com> | 2015-06-18 07:17:30 -0400 | 
| commit | e8329a7f6ae9bffbc6bdc82ca8ba52bca4f7dc78 (patch) | |
| tree | 224485913ed5ab46337a67f0ba45eddb82b33b9a /tests | |
| parent | bbb091ef8c569287b3de465f47693476689076b7 (diff) | |
| parent | ca6ce995434d9629b2f4867dff7a6361fdf77fcd (diff) | |
| download | cryptography-e8329a7f6ae9bffbc6bdc82ca8ba52bca4f7dc78.tar.gz cryptography-e8329a7f6ae9bffbc6bdc82ca8ba52bca4f7dc78.tar.bz2 cryptography-e8329a7f6ae9bffbc6bdc82ca8ba52bca4f7dc78.zip | |
Merge pull request #2041 from reaperhulk/iap-ossl
inhibit any policy extension support for the openssl backend
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_x509_ext.py | 17 | 
1 files changed, 17 insertions, 0 deletions
| diff --git a/tests/test_x509_ext.py b/tests/test_x509_ext.py index c906f1e5..6a23479f 100644 --- a/tests/test_x509_ext.py +++ b/tests/test_x509_ext.py @@ -2435,3 +2435,20 @@ class TestInhibitAnyPolicy(object):          iap2 = x509.InhibitAnyPolicy(4)          assert iap != iap2          assert iap != object() + + +@pytest.mark.requires_backend_interface(interface=RSABackend) +@pytest.mark.requires_backend_interface(interface=X509Backend) +class TestInhibitAnyPolicyExtension(object): +    def test_nocheck(self, backend): +        cert = _load_cert( +            os.path.join( +                "x509", "custom", "inhibit_any_policy_5.pem" +            ), +            x509.load_pem_x509_certificate, +            backend +        ) +        iap = cert.extensions.get_extension_for_oid( +            x509.OID_INHIBIT_ANY_POLICY +        ).value +        assert iap.skip_certs == 5 | 
