1# This file is being contributed to pyasn1-modules software. 2# 3# Created by Russ Housley with assistance from asn1ate v.0.6.0. 4# 5# Copyright (c) 2019, Vigil Security, LLC 6# License: http://snmplabs.com/pyasn1/license.html 7# 8# Multicast Email (MULE) over Allied Communications Publication 142 9# 10# ASN.1 source from: 11# https://www.rfc-editor.org/rfc/rfc8494.txt 12 13from pyasn1.type import namedtype 14from pyasn1.type import namedval 15from pyasn1.type import tag 16from pyasn1.type import univ 17 18 19id_mmhs_CDT = univ.ObjectIdentifier('1.3.26.0.4406.0.4.2') 20 21 22class AlgorithmID_ShortForm(univ.Integer): 23 pass 24 25AlgorithmID_ShortForm.namedValues = namedval.NamedValues( 26 ('zlibCompress', 0) 27) 28 29 30class ContentType_ShortForm(univ.Integer): 31 pass 32 33ContentType_ShortForm.namedValues = namedval.NamedValues( 34 ('unidentified', 0), 35 ('external', 1), 36 ('p1', 2), 37 ('p3', 3), 38 ('p7', 4), 39 ('mule', 25) 40) 41 42 43class CompressedContentInfo(univ.Sequence): 44 pass 45 46CompressedContentInfo.componentType = namedtype.NamedTypes( 47 namedtype.NamedType('unnamed', univ.Choice(componentType=namedtype.NamedTypes( 48 namedtype.NamedType('contentType-ShortForm', 49 ContentType_ShortForm().subtype(explicitTag=tag.Tag( 50 tag.tagClassContext, tag.tagFormatSimple, 0))), 51 namedtype.NamedType('contentType-OID', 52 univ.ObjectIdentifier().subtype(explicitTag=tag.Tag( 53 tag.tagClassContext, tag.tagFormatSimple, 1))) 54 ))), 55 namedtype.NamedType('compressedContent', 56 univ.OctetString().subtype(explicitTag=tag.Tag( 57 tag.tagClassContext, tag.tagFormatSimple, 0))) 58) 59 60 61class CompressionAlgorithmIdentifier(univ.Choice): 62 pass 63 64CompressionAlgorithmIdentifier.componentType = namedtype.NamedTypes( 65 namedtype.NamedType('algorithmID-ShortForm', 66 AlgorithmID_ShortForm().subtype(explicitTag=tag.Tag( 67 tag.tagClassContext, tag.tagFormatSimple, 0))), 68 namedtype.NamedType('algorithmID-OID', 69 univ.ObjectIdentifier().subtype(explicitTag=tag.Tag( 70 tag.tagClassContext, tag.tagFormatSimple, 1))) 71) 72 73 74class CompressedData(univ.Sequence): 75 pass 76 77CompressedData.componentType = namedtype.NamedTypes( 78 namedtype.NamedType('compressionAlgorithm', CompressionAlgorithmIdentifier()), 79 namedtype.NamedType('compressedContentInfo', CompressedContentInfo()) 80) 81