codekingpro/portable-devtools
114k
1#2# This file is part of pyasn1-modules software.3#4# Created by Russ Housley with assistance from asn1ate v.0.6.0.5# Modified by Russ Housley to add maps for use with opentypes.6#7# Copyright (c) 2019, Vigil Security, LLC8# License: http://snmplabs.com/pyasn1/license.html9#10# X.509 Extensions for MUD URL and MUD Signer;11# Object Identifier for CMS Content Type for a MUD file12#13# ASN.1 source from:14# https://www.rfc-editor.org/rfc/rfc8520.txt15#16 17from pyasn1.type import char18from pyasn1.type import univ19 20from pyasn1_modules import rfc528021from pyasn1_modules import rfc565222 23 24# X.509 Extension for MUD URL25 26id_pe_mud_url = univ.ObjectIdentifier('1.3.6.1.5.5.7.1.25')27 28class MUDURLSyntax(char.IA5String):29 pass30 31 32# X.509 Extension for MUD Signer33 34id_pe_mudsigner = univ.ObjectIdentifier('1.3.6.1.5.5.7.1.30')35 36class MUDsignerSyntax(rfc5280.Name):37 pass38 39 40# Object Identifier for CMS Content Type for a MUD file41 42id_ct_mudtype = univ.ObjectIdentifier('1.2.840.113549.1.9.16.1.41')43 44 45# Map of Certificate Extension OIDs to Extensions added to the46# ones that are in rfc5280.py47 48_certificateExtensionsMapUpdate = {49 id_pe_mud_url: MUDURLSyntax(),50 id_pe_mudsigner: MUDsignerSyntax(),51}52 53rfc5280.certificateExtensionsMap.update(_certificateExtensionsMapUpdate)54 55 56# Map of Content Type OIDs to Content Types added to the57# ones that are in rfc5652.py58 59_cmsContentTypesMapUpdate = {60 id_ct_mudtype: univ.OctetString(),61}62 63rfc5652.cmsContentTypesMap.update(_cmsContentTypesMapUpdate)64 