diff options
author | Russ Housley <housley@vigilsec.com> | 2019-08-18 02:12:09 -0400 |
---|---|---|
committer | Ilya Etingof <etingof@gmail.com> | 2019-08-18 08:12:09 +0200 |
commit | fdd5c3033d124ad159b9784e3e7fe304f777dbb8 (patch) | |
tree | 112c9e6888f161fc9edff9e759378460c10add33 /pyasn1_modules | |
parent | 999c682a3e9c2d7770b7032fcf67fde0bac153c3 (diff) | |
download | pyasn1-modules-fdd5c3033d124ad159b9784e3e7fe304f777dbb8.tar.gz |
Improve opentypes maps for RFC3709, RFC6402, RFC7191, and RFC8226 (#57)
Diffstat (limited to 'pyasn1_modules')
-rw-r--r-- | pyasn1_modules/rfc3709.py | 8 | ||||
-rw-r--r-- | pyasn1_modules/rfc6402.py | 11 | ||||
-rw-r--r-- | pyasn1_modules/rfc7191.py | 16 | ||||
-rw-r--r-- | pyasn1_modules/rfc8226.py | 8 |
4 files changed, 27 insertions, 16 deletions
diff --git a/pyasn1_modules/rfc3709.py b/pyasn1_modules/rfc3709.py index a52f99e..f26ba33 100644 --- a/pyasn1_modules/rfc3709.py +++ b/pyasn1_modules/rfc3709.py @@ -194,9 +194,11 @@ LogotypeExtn.componentType = namedtype.NamedTypes( ) -# Map of Certificate Extension OIDs to Extensions -# To be added to the ones that are in rfc5280.py +# Map of Certificate Extension OIDs to Extensions added to the +# ones that are in rfc5280.py -certificateExtensionsMapUpdate = { +_certificateExtensionsMapUpdate = { id_pe_logotype: LogotypeExtn(), } + +rfc5280.certificateExtensionsMap.update(_certificateExtensionsMapUpdate)
\ No newline at end of file diff --git a/pyasn1_modules/rfc6402.py b/pyasn1_modules/rfc6402.py index dbb699a..322e35e 100644 --- a/pyasn1_modules/rfc6402.py +++ b/pyasn1_modules/rfc6402.py @@ -615,10 +615,13 @@ _cmcControlAttributesMapUpdate = { cmcControlAttributesMap.update(_cmcControlAttributesMapUpdate) -# Map of CMC Content Type OIDs to CMC Content Types -# To be added to the ones that are in rfc5652.py +# Map of CMC Content Type OIDs to CMC Content Types are added to +# the ones that are in rfc5652.py -cmsContentTypesMapUpdate = { +_cmsContentTypesMapUpdate = { id_cct_PKIData: PKIData(), id_cct_PKIResponse: PKIResponse(), -}
\ No newline at end of file +} + +rfc5652.cmsContentTypesMap.update(_cmsContentTypesMapUpdate) + diff --git a/pyasn1_modules/rfc7191.py b/pyasn1_modules/rfc7191.py index 4f90be1..7c2be11 100644 --- a/pyasn1_modules/rfc7191.py +++ b/pyasn1_modules/rfc7191.py @@ -240,18 +240,22 @@ KeyPkgIdentifierAndReceiptReq.componentType = namedtype.NamedTypes( ) -# Map of Attribute Type OIDs to Attributes -# To be added to the ones that are in rfc5652.py +# Map of Attribute Type OIDs to Attributes are added to +# the ones that are in rfc5652.py -cmsAttributesMapUpdate = { +_cmsAttributesMapUpdate = { id_aa_KP_keyPkgIdAndReceiptReq: KeyPkgIdentifierAndReceiptReq(), } +rfc5652.cmsAttributesMap.update(_cmsAttributesMapUpdate) -# Map of Content Type OIDs to Content Types -# To be added to the ones that are in rfc5652.py -cmsContentTypesMapUpdate = { +# Map of CMC Content Type OIDs to CMC Content Types are added to +# the ones that are in rfc5652.py + +_cmsContentTypesMapUpdate = { id_ct_KP_keyPackageError: KeyPackageError(), id_ct_KP_keyPackageReceipt: KeyPackageReceipt(), } + +rfc5652.cmsContentTypesMap.update(_cmsContentTypesMapUpdate) diff --git a/pyasn1_modules/rfc8226.py b/pyasn1_modules/rfc8226.py index 0c3dc21..a5eb211 100644 --- a/pyasn1_modules/rfc8226.py +++ b/pyasn1_modules/rfc8226.py @@ -18,6 +18,7 @@ from pyasn1.type import namedtype from pyasn1.type import tag from pyasn1.type import univ +from pyasn1_modules import rfc5280 MAX = float('inf') @@ -133,11 +134,12 @@ id_pe_TNAuthList = _OID(1, 3, 6, 1, 5, 5, 7, 1, 26) id_ad_stirTNList = _OID(1, 3, 6, 1, 5, 5, 7, 48, 14) -# Map of Certificate Extension OIDs to Extensions -# To be added to the ones that are in rfc5280.py +# Map of Certificate Extension OIDs to Extensions added to the +# ones that are in rfc5280.py -certificateExtensionsMapUpdate = { +_certificateExtensionsMapUpdate = { id_pe_TNAuthList: TNAuthorizationList(), id_pe_JWTClaimConstraints: JWTClaimConstraints(), } +rfc5280.certificateExtensionsMap.update(_certificateExtensionsMapUpdate) |