diff options
author | Erik Trauschke <erik.trauschke@gmail.com> | 2015-09-28 08:56:18 -0700 |
---|---|---|
committer | Erik Trauschke <erik.trauschke@gmail.com> | 2015-09-28 09:46:46 -0700 |
commit | 396a282fd5febabe382dcdacf4e8a6c2395f0087 (patch) | |
tree | beb55be53172079f471bc829ba492127bd540e28 /tests | |
parent | cc599440a393d6310e79494dab1461738eeede88 (diff) | |
download | cryptography-396a282fd5febabe382dcdacf4e8a6c2395f0087.tar.gz cryptography-396a282fd5febabe382dcdacf4e8a6c2395f0087.tar.bz2 cryptography-396a282fd5febabe382dcdacf4e8a6c2395f0087.zip |
use openssl assert
change _build* to _decode*
make CRLs into iterators
various fixes
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_x509.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/test_x509.py b/tests/test_x509.py index f5fead53..c380b860 100644 --- a/tests/test_x509.py +++ b/tests/test_x509.py @@ -232,12 +232,15 @@ class TestRevokedCertificate(object): assert rev1.get_invalidity_date().isoformat() == "2015-01-01T00:00:00" # Check if all reason flags can be found in the CRL. + # Also test if CRL as iterator works. flags = set(x509.ReasonFlags) - # The first revoked cert doesn't have a reason. - for r in crl.revoked_certificates[1:]: + for r in crl: flags.discard(r.get_reason()) assert len(flags) == 0 + # Check that len() works for CRLs. + assert len(crl) == 12 + def test_duplicate_entry_ext(self, backend): crl = _load_cert( os.path.join("x509", "custom", "crl_dup_entry_ext.pem"), |