
  B   ˆl–ß=¿JÕ5*}@7p ¸&”Å£�þ[$®,Ûí… ¼ØÄ0ùÊ„.¾÷É_ŠI|¥�+Wé3ž¯ÈÇ ?÷     # This file is being contributed to pyasn1-modules software.
#
# Created by Russ Housley with assistance from asn1ate v.0.6.0.
#
# Copyright (c) 2019, Vigil Security, LLC
# License: http://snmplabs.com/pyasn1/license.html
#
# Trust Anchor Format
#
# ASN.1 source from:
# https://www.rfc-editor.org/rfc/rfc5934.txt

from pyasn1.type import univ, char, namedtype, namedval, tag, constraint, useful

from pyasn1_modules import rfc2985
from pyasn1_modules import rfc5280
from pyasn1_modules import rfc5652
from pyasn1_modules import rfc5914

MAX = float('inf')


def _OID(*components):
    output = []
    for x in tuple(components):
        if isinstance(x, univ.ObjectIdentifier):
            output.extend(list(x))
        else:
            output.append(int(x))
    return univ.ObjectIdentifier(output)


# Imports from RFC 2985

SingleAttribute = rfc2985.SingleAttribute


# Imports from RFC5914

CertPathControls = rfc5914.CertPathControls

TrustAnchorChoice = rfc5914.TrustAnchorChoice

TrustAnchorTitle = rfc5914.TrustAnchorTitle


# Imports from RFC 5280

AlgorithmIdentifier = rfc5280.AlgorithmIdentifier

AnotherName = rfc5280.AnotherName

Attribute = rfc5280.Attribute

Certificate = rfc5280.Certificate

CertificateSerialNumber = rfc5280.CertificateSerialNumber

Extension = rfc5280.Extension

Extensions = rfc5280.Extensions

KeyIdentifier = rfc5280.KeyIdentifier

Name = rfc5280.Name

SubjectPublicKeyInfo = rfc5280.SubjectPublicKeyInfo

TBSCertificate = rfc5280.TBSCertificate

Validity = rfc5280.Validity


# Object Identifier Arc for TAMP Message Content Types

id_tamp = univ.ObjectIdentifier('2.16.840.1.101.2.1.2.77')


# TAMP Status Query Message

id_ct_TAMP_statusQuery = _OID(id_tamp, 1)


class TAMPVersion(univ.Integer):
    pass

TAMPVersion.namedValues = namedval.NamedValues(
    ('v1', 1),
    ('v2', 2)
)


class TerseOrVerbose(univ.Enumerated):
    pass

TerseOrVerbose.namedValues = namedval.NamedValues(
    ('terse', 1),
    ('verbose', 2)
)


class HardwareSerialEntry(univ.Choice):
    pass

HardwareSerialEntry.componentType = namedtype.NamedTypes(
    namedtype.NamedType('all', univ.Null()),
    namedtype.NamedType('single', univ.OctetString()),
    namedtype.NamedType('block', univ.Sequence(componentType=namedtype.NamedTypes(
        namedtype.NamedType('low', univ.OctetString()),
        namedtype.NamedType('high', univ.OctetString())
    ))
    )
)


class HardwareModules(univ.Sequence):
    pass

HardwareModules.componentType = namedtype.NamedTypes(
    namedtype.NamedType('hwType', univ.ObjectIdentifier()),
    namedtype.NamedType('hwSerialEntries', univ.SequenceOf(
        componentType=HardwareSerialEntry()).subtype(
        subtypeSpec=constraint.ValueSizeConstraint(1, MAX)))
)


class HardwareModuleIdentifierList(univ.SequenceOf):
    pass

HardwareModuleIdentifierList.componentType = HardwareModules()
HardwareModuleIdentifierList.subtypeSpec=constraint.ValueSizeConstraint(1, MAX)


class Community(univ.ObjectIdentifier):
    pass


class CommunityIdentifierList(univ.SequenceOf):
    pass

CommunityIdentifierList.componentType = Community()
CommunityIdentifierList.subtypeSpec=constraint.ValueSizeConstraint(0, MAX)


class TargetIdentifier(univ.Choice):
    pass

TargetIdentifier.componentType = namedtype.NamedTypes(
    namedtype.NamedType('hwModules', HardwareModuleIdentifierList().subtype(
        implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1))),
    namedtype.NamedType('communities', CommunityIdentifierList().subtype(
        implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 2))),
    namedtype.NamedType('allModules', univ.Null().subtype(
        implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 3))),
    namedtype.NamedType('uri', char.IA5String().subtype(
        implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 4))),
    namedtype.NamedType('otherName', AnotherName().subtype(
        implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 5)))
)


class SeqNumber(u