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, LLC 8# License: http://snmplabs.com/pyasn1/license.html 9# 10# X.509 Extensions for MUD URL and MUD Signer; 11# Object Identifier for CMS Content Type for a MUD file 12# 13# ASN.1 source from: 14# https://www.rfc-editor.org/rfc/rfc8520.txt 15# 16 17from pyasn1.type import char 18from pyasn1.type import univ 19 20from pyasn1_modules import rfc5280 21from pyasn1_modules import rfc5652 22 23 24# X.509 Extension for MUD URL 25 26id_pe_mud_url = univ.ObjectIdentifier('1.3.6.1.5.5.7.1.25') 27 28class MUDURLSyntax(char.IA5String): 29 pass 30 31 32# X.509 Extension for MUD Signer 33 34id_pe_mudsigner = univ.ObjectIdentifier('1.3.6.1.5.5.7.1.30') 35 36class MUDsignerSyntax(rfc5280.Name): 37 pass 38 39 40# Object Identifier for CMS Content Type for a MUD file 41 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 the 46# ones that are in rfc5280.py 47 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 the 57# ones that are in rfc5652.py 58 59_cmsContentTypesMapUpdate = { 60 id_ct_mudtype: univ.OctetString(), 61} 62 63rfc5652.cmsContentTypesMap.update(_cmsContentTypesMapUpdate) 64