aboutsummaryrefslogtreecommitdiff
path: root/tests/test_rfc7773.py
diff options
context:
space:
mode:
authorRuss Housley <housley@vigilsec.com>2019-10-12 11:48:35 -0400
committerIlya Etingof <etingof@gmail.com>2019-10-12 17:48:35 +0200
commit86fafcc8923b1094197f20ccf794a9c66731fa34 (patch)
tree6ac7ebda222879e392ad8dc3a55afb58fb3ac7f2 /tests/test_rfc7773.py
parenta9ba285df7e5973a28b23d48bbb597980ca9ad94 (diff)
downloadpyasn1-modules-86fafcc8923b1094197f20ccf794a9c66731fa34.tar.gz
Improve test routines for modules that use certificate extensions (#80)
Improve test routines for modules that use certificate extensions
Diffstat (limited to 'tests/test_rfc7773.py')
-rw-r--r--tests/test_rfc7773.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_rfc7773.py b/tests/test_rfc7773.py
index 393187f..37765f0 100644
--- a/tests/test_rfc7773.py
+++ b/tests/test_rfc7773.py
@@ -92,7 +92,10 @@ tAGXsYdcuQpglUngmo/FV4Z9qjIDkYQ=
assert asn1Object.prettyPrint()
assert der_encode(asn1Object) == substrate
+ extn_list = [ ]
for extn in asn1Object['tbsCertificate']['extensions']:
+ extn_list.append(extn['extnID'])
+
if extn['extnID'] == rfc7773.id_ce_authContext:
s = extn['extnValue']
acs, rest = der_decode(s,
@@ -104,6 +107,8 @@ tAGXsYdcuQpglUngmo/FV4Z9qjIDkYQ=
assert u'id.elegnamnden.se' in acs[0]['contextType']
assert u'AuthContextInfo IdentityProvider' in acs[0]['contextInfo']
+ assert rfc7773.id_ce_authContext in extn_list
+
suite = unittest.TestLoader().loadTestsFromModule(sys.modules[__name__])