diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2016-01-06 19:29:08 -0500 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2016-01-06 19:29:08 -0500 |
commit | b8d851bedd284bceddebced6f601ffca89f2d337 (patch) | |
tree | e3d3f334b7932c882e57a9226eb449feccca7b75 /tests/test_x509_ext.py | |
parent | 262dd383ab1dcc7f98ea0e7ae0a0fa297500312c (diff) | |
parent | 0d943bbd2d239db90bfea61fdcd94bb87adfeb83 (diff) | |
download | cryptography-b8d851bedd284bceddebced6f601ffca89f2d337.tar.gz cryptography-b8d851bedd284bceddebced6f601ffca89f2d337.tar.bz2 cryptography-b8d851bedd284bceddebced6f601ffca89f2d337.zip |
Merge pull request #2641 from reaperhulk/fix-2640
refactor the init validation of AuthorityKeyIdentifier
Diffstat (limited to 'tests/test_x509_ext.py')
-rw-r--r-- | tests/test_x509_ext.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_x509_ext.py b/tests/test_x509_ext.py index 9ac1d2ba..ff826458 100644 --- a/tests/test_x509_ext.py +++ b/tests/test_x509_ext.py @@ -835,6 +835,13 @@ class TestAuthorityKeyIdentifier(object): assert aki.authority_cert_issuer is None assert aki.authority_cert_serial_number is None + def test_authority_cert_serial_zero(self): + dns = x509.DNSName(u"SomeIssuer") + aki = x509.AuthorityKeyIdentifier(b"id", [dns], 0) + assert aki.key_identifier == b"id" + assert aki.authority_cert_issuer == [dns] + assert aki.authority_cert_serial_number == 0 + def test_repr(self): dirname = x509.DirectoryName( x509.Name([x509.NameAttribute(NameOID.COMMON_NAME, u'myCN')]) |