diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2018-07-16 20:49:51 +0530 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2018-07-16 11:19:51 -0400 |
commit | 5d187402775bcb7bc8b0da1d972d36bf9ad9dbff (patch) | |
tree | caaf2870b516da1bfe027ef6b1886bc1ed66f300 /tests | |
parent | 2e85a925b49e566776585f35a7c0653510d84262 (diff) | |
download | cryptography-5d187402775bcb7bc8b0da1d972d36bf9ad9dbff.tar.gz cryptography-5d187402775bcb7bc8b0da1d972d36bf9ad9dbff.tar.bz2 cryptography-5d187402775bcb7bc8b0da1d972d36bf9ad9dbff.zip |
add crl.get_revoked_certificate method (#4331)
* add crl.get_revoked_certificate method
* lexicographic is the best ographic
* rename
Diffstat (limited to 'tests')
-rw-r--r-- | tests/x509/test_x509.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/x509/test_x509.py b/tests/x509/test_x509.py index fe57784a..5905e335 100644 --- a/tests/x509/test_x509.py +++ b/tests/x509/test_x509.py @@ -181,6 +181,18 @@ class TestCertificateRevocationList(object): # Check that len() works for CRLs. assert len(crl) == 12 + def test_get_revoked_certificate_by_serial_number(self, backend): + crl = _load_cert( + os.path.join( + "x509", "PKITS_data", "crls", "LongSerialNumberCACRL.crl"), + x509.load_der_x509_crl, + backend + ) + serial_number = 725064303890588110203033396814564464046290047507 + revoked = crl.get_revoked_certificate_by_serial_number(serial_number) + assert revoked.serial_number == serial_number + assert crl.get_revoked_certificate_by_serial_number(500) is None + def test_revoked_cert_retrieval_retain_only_revoked(self, backend): """ This test attempts to trigger the crash condition described in |