Debian Codegraph @

third_party/python/pyasn1_modules/pyasn1_modules/rfc7296.py

raw
1 # This file is being contributed to pyasn1-modules software.
2 #
3 # Created by Russ Housley.
4 #
5 # Copyright (c) 2019, Vigil Security, LLC
6 # License: http://snmplabs.com/pyasn1/license.html
7 #
8 # IKEv2 Certificate Bundle
9 #
10 # ASN.1 source from:
11 # https://www.rfc-editor.org/rfc/rfc7296.txt
12
13 from pyasn1.type import namedtype
14 from pyasn1.type import tag
15 from pyasn1.type import univ
16
17 from pyasn1_modules import rfc5280
18
19
20 class CertificateOrCRL(univ.Choice):
21 pass
22
23 CertificateOrCRL.componentType = namedtype.NamedTypes(
24 namedtype.NamedType('cert', rfc5280.Certificate().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
25 namedtype.NamedType('crl', rfc5280.CertificateList().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1)))
26 )
27
28
29 class CertificateBundle(univ.SequenceOf):
30 pass
31
32 CertificateBundle.componentType = CertificateOrCRL()