diff options
author | Russ Housley <housley@vigilsec.com> | 2019-07-20 06:58:55 -0400 |
---|---|---|
committer | Ilya Etingof <etingof@gmail.com> | 2019-07-20 12:58:55 +0200 |
commit | 23608be1bc0ce8a4ac5fbaba92af905c88ea4ab6 (patch) | |
tree | 67be142d26a66e2a874502f60c3e97d0059bd769 /pyasn1_modules/rfc7191.py | |
parent | 06f5be85d5229cffeb24f9ae622df665d7ae506b (diff) | |
download | pyasn1-modules-23608be1bc0ce8a4ac5fbaba92af905c88ea4ab6.tar.gz |
Added maps for use with openType (#53)
Diffstat (limited to 'pyasn1_modules/rfc7191.py')
-rw-r--r-- | pyasn1_modules/rfc7191.py | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/pyasn1_modules/rfc7191.py b/pyasn1_modules/rfc7191.py index d3e2f85..167f17a 100644 --- a/pyasn1_modules/rfc7191.py +++ b/pyasn1_modules/rfc7191.py @@ -1,7 +1,9 @@ # This file is being contributed to of pyasn1-modules software. # # Created by Russ Housley without assistance from the asn1ate tool. -# Copyright (c) 2018, Vigil Security, LLC +# Modified by Russ Housley to add support for opentypes. +# +# Copyright (c) 2019, Vigil Security, LLC # License: http://snmplabs.com/pyasn1/license.html # # CMS Key Package Receipt and Error Content Types @@ -12,10 +14,12 @@ from pyasn1.type import constraint from pyasn1.type import namedtype from pyasn1.type import namedval +from pyasn1.type import opentype from pyasn1.type import tag from pyasn1.type import univ from pyasn1_modules import rfc5280 +from pyasn1_modules import rfc5652 MAX = float('inf') @@ -41,7 +45,9 @@ class SingleAttribute(univ.Sequence): SingleAttribute.componentType = namedtype.NamedTypes( namedtype.NamedType('attrType', univ.ObjectIdentifier()), - namedtype.NamedType('attrValues', AttributeValues()) + namedtype.NamedType('attrValues', AttributeValues(), + openType=opentype.OpenType('attrType', rfc5652.cmsAttributesMap) + ) ) @@ -232,3 +238,20 @@ KeyPkgIdentifierAndReceiptReq.componentType = namedtype.NamedTypes( namedtype.NamedType('pkgID', KeyPkgID()), namedtype.OptionalNamedType('receiptReq', KeyPkgReceiptReq()) ) + + +# Map of Attribute Type OIDs to Attributes +# To be added to the ones that are in rfc5652.py + +cmsAttributesMapUpdate = { + id_aa_KP_keyPkgIdAndReceiptReq: KeyPkgIdentifierAndReceiptReq(), +} + + +# Map of Content Type OIDs to Content Types +# To be added to the ones that are in rfc5652.py + +cmsContentTypesMapUpdate = { + id_ct_KP_keyPackageError: KeyPackageError(), + id_ct_KP_keyPackageReceipt: KeyPackageReceipt(), +}
\ No newline at end of file |