aboutsummaryrefslogtreecommitdiff
path: root/tests/test_rfc2634.py
diff options
context:
space:
mode:
authorRuss Housley <housley@vigilsec.com>2019-09-08 09:41:53 -0400
committerIlya Etingof <etingof@gmail.com>2019-09-08 15:41:53 +0200
commit15bc77911a8394c1814456947d6f0ddd85b0e82e (patch)
tree481de5d756f2bc259fec367fbca62f0a47bdebb8 /tests/test_rfc2634.py
parent674015081b7a2d157a832f1ba6a0f7400b859dc4 (diff)
downloadpyasn1-modules-15bc77911a8394c1814456947d6f0ddd85b0e82e.tar.gz
Add support for RFC 3894 and openTypes map cleanup (#62)
Diffstat (limited to 'tests/test_rfc2634.py')
-rw-r--r--tests/test_rfc2634.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/test_rfc2634.py b/tests/test_rfc2634.py
index d57315b..18c8a3d 100644
--- a/tests/test_rfc2634.py
+++ b/tests/test_rfc2634.py
@@ -73,8 +73,8 @@ mNTr0mjYeUWRe/15IsWNx+kuFcLDr71DFHvMFY5M3sdfMA==
sat = sa['attrType']
sav0 = sa['attrValues'][0]
- if sat in rfc2634.ESSAttributeMap.keys():
- sav, rest = der_decode(sav0, asn1Spec=rfc2634.ESSAttributeMap[sat])
+ if sat in rfc5652.cmsAttributesMap.keys():
+ sav, rest = der_decode(sav0, asn1Spec=rfc5652.cmsAttributesMap[sat])
assert not rest
assert sav.prettyPrint()
assert der_encode(sav) == sav0
@@ -139,18 +139,17 @@ lropBdPJ6jIXiZQgCwxbGTCwCMQClaQ9K+L5LTeuW50ZKSIbmBZQ5dxjtnK3OlS
sat = sa['attrType']
sav0 = sa['attrValues'][0]
- if sat in rfc2634.ESSAttributeMap.keys():
- sav, rest = der_decode(sav0, asn1Spec=rfc2634.ESSAttributeMap[sat])
+ if sat in rfc5652.cmsAttributesMap.keys():
+ sav, rest = der_decode(sav0, asn1Spec=rfc5652.cmsAttributesMap[sat])
assert not rest
assert sav.prettyPrint()
assert der_encode(sav) == sav0
def testOpenTypes(self):
substrate = pem.readBase64fromText(self.signed_receipt_pem_text)
- rfc5652.cmsContentTypesMap.update(rfc2634.cmsContentTypesMapUpdate)
- rfc5652.cmsAttributesMap.update(rfc2634.ESSAttributeMap)
asn1Object, rest = der_decode(substrate,
- asn1Spec=self.asn1Spec, decodeOpenTypes=True)
+ asn1Spec=self.asn1Spec,
+ decodeOpenTypes=True)
assert not rest
assert asn1Object.prettyPrint()
assert der_encode(asn1Object) == substrate