pyasn1-alt-modules 0.4.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pyasn1-alt-modules might be problematic. Click here for more details.
- pyasn1_alt_modules/__init__.py +2 -0
- pyasn1_alt_modules/opentypemap.py +19 -0
- pyasn1_alt_modules/pem.py +66 -0
- pyasn1_alt_modules/rfc1155.py +97 -0
- pyasn1_alt_modules/rfc1157.py +127 -0
- pyasn1_alt_modules/rfc1901.py +23 -0
- pyasn1_alt_modules/rfc1902.py +130 -0
- pyasn1_alt_modules/rfc1905.py +136 -0
- pyasn1_alt_modules/rfc2040.py +50 -0
- pyasn1_alt_modules/rfc2251.py +564 -0
- pyasn1_alt_modules/rfc2314.py +68 -0
- pyasn1_alt_modules/rfc2315.py +325 -0
- pyasn1_alt_modules/rfc2437.py +70 -0
- pyasn1_alt_modules/rfc2459.py +1340 -0
- pyasn1_alt_modules/rfc2511.py +303 -0
- pyasn1_alt_modules/rfc2528.py +34 -0
- pyasn1_alt_modules/rfc2560.py +226 -0
- pyasn1_alt_modules/rfc2631.py +37 -0
- pyasn1_alt_modules/rfc2634.py +342 -0
- pyasn1_alt_modules/rfc2743.py +60 -0
- pyasn1_alt_modules/rfc2876.py +61 -0
- pyasn1_alt_modules/rfc2898.py +72 -0
- pyasn1_alt_modules/rfc2985.py +593 -0
- pyasn1_alt_modules/rfc2986.py +76 -0
- pyasn1_alt_modules/rfc3058.py +48 -0
- pyasn1_alt_modules/rfc3114.py +80 -0
- pyasn1_alt_modules/rfc3125.py +469 -0
- pyasn1_alt_modules/rfc3161.py +142 -0
- pyasn1_alt_modules/rfc3217.py +42 -0
- pyasn1_alt_modules/rfc3274.py +62 -0
- pyasn1_alt_modules/rfc3279.py +264 -0
- pyasn1_alt_modules/rfc3280.py +1544 -0
- pyasn1_alt_modules/rfc3281.py +332 -0
- pyasn1_alt_modules/rfc3370.py +142 -0
- pyasn1_alt_modules/rfc3412.py +54 -0
- pyasn1_alt_modules/rfc3414.py +29 -0
- pyasn1_alt_modules/rfc3447.py +46 -0
- pyasn1_alt_modules/rfc3537.py +44 -0
- pyasn1_alt_modules/rfc3546.py +23 -0
- pyasn1_alt_modules/rfc3560.py +74 -0
- pyasn1_alt_modules/rfc3565.py +59 -0
- pyasn1_alt_modules/rfc3657.py +69 -0
- pyasn1_alt_modules/rfc3709.py +230 -0
- pyasn1_alt_modules/rfc3739.py +207 -0
- pyasn1_alt_modules/rfc3770.py +77 -0
- pyasn1_alt_modules/rfc3779.py +139 -0
- pyasn1_alt_modules/rfc3820.py +66 -0
- pyasn1_alt_modules/rfc3852.py +707 -0
- pyasn1_alt_modules/rfc3874.py +29 -0
- pyasn1_alt_modules/rfc4010.py +58 -0
- pyasn1_alt_modules/rfc4043.py +45 -0
- pyasn1_alt_modules/rfc4055.py +285 -0
- pyasn1_alt_modules/rfc4056.py +56 -0
- pyasn1_alt_modules/rfc4059.py +101 -0
- pyasn1_alt_modules/rfc4073.py +62 -0
- pyasn1_alt_modules/rfc4108.py +355 -0
- pyasn1_alt_modules/rfc4210.py +807 -0
- pyasn1_alt_modules/rfc4211.py +420 -0
- pyasn1_alt_modules/rfc4231.py +38 -0
- pyasn1_alt_modules/rfc4262.py +37 -0
- pyasn1_alt_modules/rfc4334.py +78 -0
- pyasn1_alt_modules/rfc4357.py +485 -0
- pyasn1_alt_modules/rfc4366.py +23 -0
- pyasn1_alt_modules/rfc4387.py +23 -0
- pyasn1_alt_modules/rfc4476.py +99 -0
- pyasn1_alt_modules/rfc4490.py +119 -0
- pyasn1_alt_modules/rfc4491.py +44 -0
- pyasn1_alt_modules/rfc4683.py +76 -0
- pyasn1_alt_modules/rfc4985.py +52 -0
- pyasn1_alt_modules/rfc4998.py +125 -0
- pyasn1_alt_modules/rfc5035.py +206 -0
- pyasn1_alt_modules/rfc5055.py +763 -0
- pyasn1_alt_modules/rfc5083.py +55 -0
- pyasn1_alt_modules/rfc5084.py +94 -0
- pyasn1_alt_modules/rfc5126.py +578 -0
- pyasn1_alt_modules/rfc5208.py +73 -0
- pyasn1_alt_modules/rfc5275.py +404 -0
- pyasn1_alt_modules/rfc5276.py +82 -0
- pyasn1_alt_modules/rfc5280.py +1666 -0
- pyasn1_alt_modules/rfc5480.py +190 -0
- pyasn1_alt_modules/rfc5544.py +127 -0
- pyasn1_alt_modules/rfc5636.py +117 -0
- pyasn1_alt_modules/rfc5639.py +49 -0
- pyasn1_alt_modules/rfc5649.py +33 -0
- pyasn1_alt_modules/rfc5652.py +763 -0
- pyasn1_alt_modules/rfc5697.py +64 -0
- pyasn1_alt_modules/rfc5698.py +159 -0
- pyasn1_alt_modules/rfc5751.py +127 -0
- pyasn1_alt_modules/rfc5752.py +52 -0
- pyasn1_alt_modules/rfc5753.py +163 -0
- pyasn1_alt_modules/rfc5755.py +400 -0
- pyasn1_alt_modules/rfc5913.py +46 -0
- pyasn1_alt_modules/rfc5914.py +119 -0
- pyasn1_alt_modules/rfc5915.py +32 -0
- pyasn1_alt_modules/rfc5916.py +39 -0
- pyasn1_alt_modules/rfc5917.py +59 -0
- pyasn1_alt_modules/rfc5924.py +19 -0
- pyasn1_alt_modules/rfc5934.py +786 -0
- pyasn1_alt_modules/rfc5940.py +62 -0
- pyasn1_alt_modules/rfc5958.py +100 -0
- pyasn1_alt_modules/rfc5990.py +238 -0
- pyasn1_alt_modules/rfc6010.py +92 -0
- pyasn1_alt_modules/rfc6019.py +46 -0
- pyasn1_alt_modules/rfc6031.py +469 -0
- pyasn1_alt_modules/rfc6032.py +71 -0
- pyasn1_alt_modules/rfc6066.py +25 -0
- pyasn1_alt_modules/rfc6120.py +46 -0
- pyasn1_alt_modules/rfc6170.py +17 -0
- pyasn1_alt_modules/rfc6187.py +22 -0
- pyasn1_alt_modules/rfc6210.py +45 -0
- pyasn1_alt_modules/rfc6211.py +75 -0
- pyasn1_alt_modules/rfc6402.py +643 -0
- pyasn1_alt_modules/rfc6482.py +77 -0
- pyasn1_alt_modules/rfc6484.py +17 -0
- pyasn1_alt_modules/rfc6486.py +70 -0
- pyasn1_alt_modules/rfc6487.py +22 -0
- pyasn1_alt_modules/rfc6492.py +41 -0
- pyasn1_alt_modules/rfc6493.py +24 -0
- pyasn1_alt_modules/rfc6494.py +23 -0
- pyasn1_alt_modules/rfc6664.py +151 -0
- pyasn1_alt_modules/rfc6955.py +112 -0
- pyasn1_alt_modules/rfc6960.py +234 -0
- pyasn1_alt_modules/rfc6962.py +52 -0
- pyasn1_alt_modules/rfc7030.py +70 -0
- pyasn1_alt_modules/rfc7191.py +267 -0
- pyasn1_alt_modules/rfc7229.py +29 -0
- pyasn1_alt_modules/rfc7292.py +359 -0
- pyasn1_alt_modules/rfc7296.py +32 -0
- pyasn1_alt_modules/rfc7508.py +92 -0
- pyasn1_alt_modules/rfc7585.py +53 -0
- pyasn1_alt_modules/rfc7633.py +40 -0
- pyasn1_alt_modules/rfc7693.py +66 -0
- pyasn1_alt_modules/rfc7773.py +54 -0
- pyasn1_alt_modules/rfc7836.py +65 -0
- pyasn1_alt_modules/rfc7894.py +100 -0
- pyasn1_alt_modules/rfc7906.py +739 -0
- pyasn1_alt_modules/rfc7914.py +55 -0
- pyasn1_alt_modules/rfc8017.py +159 -0
- pyasn1_alt_modules/rfc8018.py +269 -0
- pyasn1_alt_modules/rfc8103.py +36 -0
- pyasn1_alt_modules/rfc8209.py +20 -0
- pyasn1_alt_modules/rfc8226.py +151 -0
- pyasn1_alt_modules/rfc8358.py +54 -0
- pyasn1_alt_modules/rfc8360.py +46 -0
- pyasn1_alt_modules/rfc8398.py +55 -0
- pyasn1_alt_modules/rfc8410.py +43 -0
- pyasn1_alt_modules/rfc8418.py +36 -0
- pyasn1_alt_modules/rfc8419.py +70 -0
- pyasn1_alt_modules/rfc8479.py +48 -0
- pyasn1_alt_modules/rfc8494.py +80 -0
- pyasn1_alt_modules/rfc8520.py +66 -0
- pyasn1_alt_modules/rfc8619.py +45 -0
- pyasn1_alt_modules/rfc8649.py +42 -0
- pyasn1_alt_modules/rfc8692.py +79 -0
- pyasn1_alt_modules/rfc8696.py +108 -0
- pyasn1_alt_modules/rfc8702.py +109 -0
- pyasn1_alt_modules/rfc8708.py +43 -0
- pyasn1_alt_modules/rfc8737.py +36 -0
- pyasn1_alt_modules/rfc8769.py +21 -0
- pyasn1_alt_modules/rfc8894.py +52 -0
- pyasn1_alt_modules/rfc8951.py +42 -0
- pyasn1_alt_modules/rfc8954.py +238 -0
- pyasn1_alt_modules/rfc8994.py +52 -0
- pyasn1_alt_modules/rfc8995.py +39 -0
- pyasn1_alt_modules/rfc9044.py +80 -0
- pyasn1_alt_modules/rfc9092.py +35 -0
- pyasn1_alt_modules/rfc9118.py +82 -0
- pyasn1_alt_modules/rfc9174.py +55 -0
- pyasn1_alt_modules/rfc9189.py +74 -0
- pyasn1_alt_modules/rfc9215.py +228 -0
- pyasn1_alt_modules/rfc9286.py +78 -0
- pyasn1_alt_modules/rfc9289.py +22 -0
- pyasn1_alt_modules/rfc9310.py +46 -0
- pyasn1_alt_modules/rfc9323.py +129 -0
- pyasn1_alt_modules/rfc9336.py +20 -0
- pyasn1_alt_modules/rfc9337.py +74 -0
- pyasn1_alt_modules/rfc9345.py +36 -0
- pyasn1_alt_modules/rfc9385.py +22 -0
- pyasn1_alt_modules/rfc9399.py +59 -0
- pyasn1_alt_modules/rfc9480.py +731 -0
- pyasn1_alt_modules/rfc9481.py +224 -0
- pyasn1_alt_modules/rfc9509.py +24 -0
- pyasn1_alt_modules/rfc9548.py +23 -0
- pyasn1_alt_modules/rfc9579.py +89 -0
- pyasn1_alt_modules/rfc9582.py +107 -0
- pyasn1_alt_modules/rfc9598.py +52 -0
- pyasn1_alt_modules/rfc9608.py +35 -0
- pyasn1_alt_modules/rfc9629.py +100 -0
- pyasn1_alt_modules/rfc9654.py +241 -0
- pyasn1_alt_modules-0.4.5.dist-info/LICENSE.txt +25 -0
- pyasn1_alt_modules-0.4.5.dist-info/METADATA +34 -0
- pyasn1_alt_modules-0.4.5.dist-info/RECORD +195 -0
- pyasn1_alt_modules-0.4.5.dist-info/WHEEL +5 -0
- pyasn1_alt_modules-0.4.5.dist-info/top_level.txt +1 -0
- pyasn1_alt_modules-0.4.5.dist-info/zip-safe +1 -0
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file is part of pyasn1-alt-modules software.
|
|
3
|
+
#
|
|
4
|
+
# Created by Russ Housley.
|
|
5
|
+
# Modified by Russ Housley to include the opentypemap manager.
|
|
6
|
+
#
|
|
7
|
+
# Copyright (c) 2019-2024, Vigil Security, LLC
|
|
8
|
+
# License: http://vigilsec.com/pyasn1-alt-modules-license.txt
|
|
9
|
+
#
|
|
10
|
+
# Online Certificate Status Protocol (OCSP)
|
|
11
|
+
#
|
|
12
|
+
# ASN.1 source from:
|
|
13
|
+
# https://www.rfc-editor.org/rfc/rfc6960.txt
|
|
14
|
+
#
|
|
15
|
+
|
|
16
|
+
from pyasn1.type import char
|
|
17
|
+
from pyasn1.type import namedtype
|
|
18
|
+
from pyasn1.type import tag
|
|
19
|
+
from pyasn1.type import univ
|
|
20
|
+
from pyasn1.type import useful
|
|
21
|
+
|
|
22
|
+
from pyasn1_alt_modules import rfc2560
|
|
23
|
+
from pyasn1_alt_modules import rfc5280
|
|
24
|
+
from pyasn1_alt_modules import opentypemap
|
|
25
|
+
|
|
26
|
+
certificateExtensionsMap = opentypemap.get('certificateExtensionsMap')
|
|
27
|
+
|
|
28
|
+
ocspResponseMap = opentypemap.get('ocspResponseMap')
|
|
29
|
+
|
|
30
|
+
MAX = float('inf')
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
# Imports from RFC 5280
|
|
34
|
+
|
|
35
|
+
AlgorithmIdentifier = rfc5280.AlgorithmIdentifier
|
|
36
|
+
AuthorityInfoAccessSyntax = rfc5280.AuthorityInfoAccessSyntax
|
|
37
|
+
Certificate = rfc5280.Certificate
|
|
38
|
+
CertificateSerialNumber = rfc5280.CertificateSerialNumber
|
|
39
|
+
CRLReason = rfc5280.CRLReason
|
|
40
|
+
Extensions = rfc5280.Extensions
|
|
41
|
+
GeneralName = rfc5280.GeneralName
|
|
42
|
+
Name = rfc5280.Name
|
|
43
|
+
|
|
44
|
+
id_kp = rfc5280.id_kp
|
|
45
|
+
|
|
46
|
+
id_ad_ocsp = rfc5280.id_ad_ocsp
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
# Imports from the original OCSP module in RFC 2560
|
|
50
|
+
|
|
51
|
+
AcceptableResponses = rfc2560.AcceptableResponses
|
|
52
|
+
ArchiveCutoff = rfc2560.ArchiveCutoff
|
|
53
|
+
CertStatus = rfc2560.CertStatus
|
|
54
|
+
KeyHash = rfc2560.KeyHash
|
|
55
|
+
OCSPResponse = rfc2560.OCSPResponse
|
|
56
|
+
OCSPResponseStatus = rfc2560.OCSPResponseStatus
|
|
57
|
+
ResponseBytes = rfc2560.ResponseBytes
|
|
58
|
+
RevokedInfo = rfc2560.RevokedInfo
|
|
59
|
+
UnknownInfo = rfc2560.UnknownInfo
|
|
60
|
+
Version = rfc2560.Version
|
|
61
|
+
|
|
62
|
+
id_kp_OCSPSigning = rfc2560.id_kp_OCSPSigning
|
|
63
|
+
|
|
64
|
+
id_pkix_ocsp = rfc2560.id_pkix_ocsp
|
|
65
|
+
id_pkix_ocsp_archive_cutoff = rfc2560.id_pkix_ocsp_archive_cutoff
|
|
66
|
+
id_pkix_ocsp_basic = rfc2560.id_pkix_ocsp_basic
|
|
67
|
+
id_pkix_ocsp_crl = rfc2560.id_pkix_ocsp_crl
|
|
68
|
+
id_pkix_ocsp_nocheck = rfc2560.id_pkix_ocsp_nocheck
|
|
69
|
+
id_pkix_ocsp_nonce = rfc2560.id_pkix_ocsp_nonce
|
|
70
|
+
id_pkix_ocsp_response = rfc2560.id_pkix_ocsp_response
|
|
71
|
+
id_pkix_ocsp_service_locator = rfc2560.id_pkix_ocsp_service_locator
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
# Additional object identifiers
|
|
75
|
+
|
|
76
|
+
id_pkix_ocsp_pref_sig_algs = id_pkix_ocsp + (8, )
|
|
77
|
+
id_pkix_ocsp_extended_revoke = id_pkix_ocsp + (9, )
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
# Updated structures (mostly to improve openTypes support)
|
|
81
|
+
|
|
82
|
+
class CertID(univ.Sequence):
|
|
83
|
+
componentType = namedtype.NamedTypes(
|
|
84
|
+
namedtype.NamedType('hashAlgorithm', AlgorithmIdentifier()),
|
|
85
|
+
namedtype.NamedType('issuerNameHash', univ.OctetString()),
|
|
86
|
+
namedtype.NamedType('issuerKeyHash', univ.OctetString()),
|
|
87
|
+
namedtype.NamedType('serialNumber', CertificateSerialNumber())
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
class SingleResponse(univ.Sequence):
|
|
92
|
+
componentType = namedtype.NamedTypes(
|
|
93
|
+
namedtype.NamedType('certID', CertID()),
|
|
94
|
+
namedtype.NamedType('certStatus', CertStatus()),
|
|
95
|
+
namedtype.NamedType('thisUpdate', useful.GeneralizedTime()),
|
|
96
|
+
namedtype.OptionalNamedType('nextUpdate', useful.GeneralizedTime().subtype(
|
|
97
|
+
explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
|
|
98
|
+
namedtype.OptionalNamedType('singleExtensions', Extensions().subtype(
|
|
99
|
+
explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1)))
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
class ResponderID(univ.Choice):
|
|
104
|
+
componentType = namedtype.NamedTypes(
|
|
105
|
+
namedtype.NamedType('byName', Name().subtype(
|
|
106
|
+
explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1))),
|
|
107
|
+
namedtype.NamedType('byKey', KeyHash().subtype(
|
|
108
|
+
explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 2)))
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
class ResponseData(univ.Sequence):
|
|
113
|
+
componentType = namedtype.NamedTypes(
|
|
114
|
+
namedtype.DefaultedNamedType('version', Version('v1').subtype(
|
|
115
|
+
explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
|
|
116
|
+
namedtype.NamedType('responderID', ResponderID()),
|
|
117
|
+
namedtype.NamedType('producedAt', useful.GeneralizedTime()),
|
|
118
|
+
namedtype.NamedType('responses', univ.SequenceOf(
|
|
119
|
+
componentType=SingleResponse())),
|
|
120
|
+
namedtype.OptionalNamedType('responseExtensions', Extensions().subtype(
|
|
121
|
+
explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1)))
|
|
122
|
+
)
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
class BasicOCSPResponse(univ.Sequence):
|
|
126
|
+
componentType = namedtype.NamedTypes(
|
|
127
|
+
namedtype.NamedType('tbsResponseData', ResponseData()),
|
|
128
|
+
namedtype.NamedType('signatureAlgorithm', AlgorithmIdentifier()),
|
|
129
|
+
namedtype.NamedType('signature', univ.BitString()),
|
|
130
|
+
namedtype.OptionalNamedType('certs', univ.SequenceOf(
|
|
131
|
+
componentType=Certificate()).subtype(explicitTag=tag.Tag(
|
|
132
|
+
tag.tagClassContext, tag.tagFormatSimple, 0)))
|
|
133
|
+
)
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
class Request(univ.Sequence):
|
|
137
|
+
componentType = namedtype.NamedTypes(
|
|
138
|
+
namedtype.NamedType('reqCert', CertID()),
|
|
139
|
+
namedtype.OptionalNamedType('singleRequestExtensions', Extensions().subtype(
|
|
140
|
+
explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0)))
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
class Signature(univ.Sequence):
|
|
145
|
+
componentType = namedtype.NamedTypes(
|
|
146
|
+
namedtype.NamedType('signatureAlgorithm', AlgorithmIdentifier()),
|
|
147
|
+
namedtype.NamedType('signature', univ.BitString()),
|
|
148
|
+
namedtype.OptionalNamedType('certs', univ.SequenceOf(
|
|
149
|
+
componentType=Certificate()).subtype(explicitTag=tag.Tag(
|
|
150
|
+
tag.tagClassContext, tag.tagFormatSimple, 0)))
|
|
151
|
+
)
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
class TBSRequest(univ.Sequence):
|
|
155
|
+
componentType = namedtype.NamedTypes(
|
|
156
|
+
namedtype.DefaultedNamedType('version', Version('v1').subtype(
|
|
157
|
+
explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
|
|
158
|
+
namedtype.OptionalNamedType('requestorName', GeneralName().subtype(
|
|
159
|
+
explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1))),
|
|
160
|
+
namedtype.NamedType('requestList', univ.SequenceOf(
|
|
161
|
+
componentType=Request())),
|
|
162
|
+
namedtype.OptionalNamedType('requestExtensions', Extensions().subtype(
|
|
163
|
+
explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 2)))
|
|
164
|
+
)
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
class OCSPRequest(univ.Sequence):
|
|
168
|
+
componentType = namedtype.NamedTypes(
|
|
169
|
+
namedtype.NamedType('tbsRequest', TBSRequest()),
|
|
170
|
+
namedtype.OptionalNamedType('optionalSignature', Signature().subtype(
|
|
171
|
+
explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0)))
|
|
172
|
+
)
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
# Previously omitted structure
|
|
176
|
+
|
|
177
|
+
class ServiceLocator(univ.Sequence):
|
|
178
|
+
componentType = namedtype.NamedTypes(
|
|
179
|
+
namedtype.NamedType('issuer', Name()),
|
|
180
|
+
namedtype.NamedType('locator', AuthorityInfoAccessSyntax())
|
|
181
|
+
)
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
# Additional structures
|
|
185
|
+
|
|
186
|
+
class CrlID(univ.Sequence):
|
|
187
|
+
componentType = namedtype.NamedTypes(
|
|
188
|
+
namedtype.OptionalNamedType('crlUrl', char.IA5String().subtype(
|
|
189
|
+
explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
|
|
190
|
+
namedtype.OptionalNamedType('crlNum', univ.Integer().subtype(
|
|
191
|
+
explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1))),
|
|
192
|
+
namedtype.OptionalNamedType('crlTime', useful.GeneralizedTime().subtype(
|
|
193
|
+
explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 2)))
|
|
194
|
+
)
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
class PreferredSignatureAlgorithm(univ.Sequence):
|
|
198
|
+
componentType = namedtype.NamedTypes(
|
|
199
|
+
namedtype.NamedType('sigIdentifier', AlgorithmIdentifier()),
|
|
200
|
+
namedtype.OptionalNamedType('certIdentifier', AlgorithmIdentifier())
|
|
201
|
+
)
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
class PreferredSignatureAlgorithms(univ.SequenceOf):
|
|
205
|
+
componentType = PreferredSignatureAlgorithm()
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
# Update the OCSP Response Map
|
|
210
|
+
|
|
211
|
+
_ocspResponseMapUpdate = {
|
|
212
|
+
id_pkix_ocsp_basic: BasicOCSPResponse(),
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
ocspResponseMap.update(_ocspResponseMapUpdate)
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
# Update the Certificate Extension Extensions Map
|
|
219
|
+
|
|
220
|
+
_certificateExtensionsMapUpdate = {
|
|
221
|
+
# Certificate Extension
|
|
222
|
+
id_pkix_ocsp_nocheck: univ.Null(""),
|
|
223
|
+
# OCSP Request Extensions
|
|
224
|
+
id_pkix_ocsp_nonce: univ.OctetString(),
|
|
225
|
+
id_pkix_ocsp_response: AcceptableResponses(),
|
|
226
|
+
id_pkix_ocsp_service_locator: ServiceLocator(),
|
|
227
|
+
id_pkix_ocsp_pref_sig_algs: PreferredSignatureAlgorithms(),
|
|
228
|
+
# OCSP Response Extensions
|
|
229
|
+
id_pkix_ocsp_crl: CrlID(),
|
|
230
|
+
id_pkix_ocsp_archive_cutoff: ArchiveCutoff(),
|
|
231
|
+
id_pkix_ocsp_extended_revoke: univ.Null(""),
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
certificateExtensionsMap.update(_certificateExtensionsMapUpdate)
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file is part of pyasn1-alt-modules software.
|
|
3
|
+
#
|
|
4
|
+
# Created by Russ Housley.
|
|
5
|
+
# Modified by Russ Housley to include the opentypemap manager.
|
|
6
|
+
#
|
|
7
|
+
# Copyright (c) 2021-2024, Vigil Security, LLC
|
|
8
|
+
# License: http://vigilsec.com/pyasn1-alt-modules-license.txt
|
|
9
|
+
#
|
|
10
|
+
# Certificate Transparency
|
|
11
|
+
#
|
|
12
|
+
# ASN.1 source from:
|
|
13
|
+
# https://www.rfc-editor.org/rfc/rfc6962.txt
|
|
14
|
+
#
|
|
15
|
+
|
|
16
|
+
from pyasn1.type import univ
|
|
17
|
+
|
|
18
|
+
from pyasn1_alt_modules import opentypemap
|
|
19
|
+
|
|
20
|
+
certificateExtensionsMap = opentypemap.get('certificateExtensionsMap')
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class SignedCertificateTimestampList(univ.OctetString):
|
|
24
|
+
pass
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
id_ce_embeddedSCT = univ.ObjectIdentifier('1.3.6.1.4.1.11129.2.4.2')
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
id_ce_criticalPoison = univ.ObjectIdentifier('1.3.6.1.4.1.11129.2.4.3')
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
id_kp_precertificateSigning = univ.ObjectIdentifier('1.3.6.1.4.1.11129.2.4.4')
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
id_pkix_ocsp_SCT = univ.ObjectIdentifier('1.3.6.1.4.1.11129.2.4.5')
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
# Update the Certificate Extension Map
|
|
40
|
+
#
|
|
41
|
+
# Note that rfc6960.py also uses this same map for OCSP extensions.
|
|
42
|
+
# The id_ce_criticalPoison OID is not automatically added to the map
|
|
43
|
+
# because normal relying parties are supposed to reject certificates
|
|
44
|
+
# that contain it.
|
|
45
|
+
|
|
46
|
+
_certificateExtensionsMapUpdate = {
|
|
47
|
+
id_ce_embeddedSCT: SignedCertificateTimestampList(),
|
|
48
|
+
# id_ce_criticalPoison: univ.Null(""),
|
|
49
|
+
id_pkix_ocsp_SCT: SignedCertificateTimestampList(),
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
certificateExtensionsMap.update(_certificateExtensionsMapUpdate)
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file is part of pyasn1-alt-modules software.
|
|
3
|
+
#
|
|
4
|
+
# Created by Russ Housley with assistance from asn1ate v.0.6.0.
|
|
5
|
+
# Modified by Russ Housley to include the opentypemap manager.
|
|
6
|
+
#
|
|
7
|
+
# Copyright (c) 2019-2024, Vigil Security, LLC
|
|
8
|
+
# License: http://vigilsec.com/pyasn1-alt-modules-license.txt
|
|
9
|
+
#
|
|
10
|
+
# Enrollment over Secure Transport (EST)
|
|
11
|
+
#
|
|
12
|
+
# ASN.1 source from:
|
|
13
|
+
# https://www.rfc-editor.org/rfc/rfc7030.txt
|
|
14
|
+
#
|
|
15
|
+
|
|
16
|
+
from pyasn1.type import constraint
|
|
17
|
+
from pyasn1.type import namedtype
|
|
18
|
+
from pyasn1.type import univ
|
|
19
|
+
|
|
20
|
+
from pyasn1_alt_modules import rfc5652
|
|
21
|
+
from pyasn1_alt_modules import opentypemap
|
|
22
|
+
|
|
23
|
+
cmsAttributesMap = opentypemap.get('cmsAttributesMap')
|
|
24
|
+
|
|
25
|
+
MAX = float('inf')
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
# Imports from RFC 5652
|
|
29
|
+
|
|
30
|
+
Attribute = rfc5652.Attribute
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
# Asymmetric Decrypt Key Identifier Attribute
|
|
34
|
+
|
|
35
|
+
id_aa_asymmDecryptKeyID = univ.ObjectIdentifier('1.2.840.113549.1.9.16.2.54')
|
|
36
|
+
|
|
37
|
+
class AsymmetricDecryptKeyIdentifier(univ.OctetString):
|
|
38
|
+
pass
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
aa_asymmDecryptKeyID = Attribute()
|
|
42
|
+
aa_asymmDecryptKeyID['attrType'] = id_aa_asymmDecryptKeyID
|
|
43
|
+
aa_asymmDecryptKeyID['attrValues'][0] = AsymmetricDecryptKeyIdentifier()
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
# CSR Attributes
|
|
47
|
+
|
|
48
|
+
class AttrOrOID(univ.Choice):
|
|
49
|
+
pass
|
|
50
|
+
|
|
51
|
+
AttrOrOID.componentType = namedtype.NamedTypes(
|
|
52
|
+
namedtype.NamedType('oid', univ.ObjectIdentifier()),
|
|
53
|
+
namedtype.NamedType('attribute', Attribute())
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
class CsrAttrs(univ.SequenceOf):
|
|
58
|
+
pass
|
|
59
|
+
|
|
60
|
+
CsrAttrs.componentType = AttrOrOID()
|
|
61
|
+
CsrAttrs.subtypeSpec=constraint.ValueSizeConstraint(0, MAX)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
# Update CMS Attribute Map
|
|
65
|
+
|
|
66
|
+
_cmsAttributesMapUpdate = {
|
|
67
|
+
id_aa_asymmDecryptKeyID: AsymmetricDecryptKeyIdentifier(),
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
cmsAttributesMap.update(_cmsAttributesMapUpdate)
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
# This file is being contributed to of pyasn1-modules software.
|
|
2
|
+
#
|
|
3
|
+
# Created by Russ Housley without assistance from the asn1ate tool.
|
|
4
|
+
# Modified by Russ Housley to add support for opentypes.
|
|
5
|
+
# Modified by Russ Housley to include the opentypemap manager.
|
|
6
|
+
#
|
|
7
|
+
# Copyright (c) 2019-2024, Vigil Security, LLC
|
|
8
|
+
# License: http://vigilsec.com/pyasn1-alt-modules-license.txt
|
|
9
|
+
#
|
|
10
|
+
# CMS Key Package Receipt and Error Content Types
|
|
11
|
+
#
|
|
12
|
+
# ASN.1 source from:
|
|
13
|
+
# https://www.rfc-editor.org/rfc/rfc7191.txt
|
|
14
|
+
|
|
15
|
+
from pyasn1.type import constraint
|
|
16
|
+
from pyasn1.type import namedtype
|
|
17
|
+
from pyasn1.type import namedval
|
|
18
|
+
from pyasn1.type import opentype
|
|
19
|
+
from pyasn1.type import tag
|
|
20
|
+
from pyasn1.type import univ
|
|
21
|
+
|
|
22
|
+
from pyasn1_alt_modules import rfc5280
|
|
23
|
+
from pyasn1_alt_modules import opentypemap
|
|
24
|
+
|
|
25
|
+
cmsAttributesMap = opentypemap.get('cmsAttributesMap')
|
|
26
|
+
|
|
27
|
+
cmsContentTypesMap = opentypemap.get('cmsContentTypesMap')
|
|
28
|
+
|
|
29
|
+
MAX = float('inf')
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
# Import from RFC 5280
|
|
33
|
+
|
|
34
|
+
DistinguishedName = rfc5280.DistinguishedName
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
# SingleAttribute is the same as Attribute in RFC 5652, except that the
|
|
38
|
+
# attrValues SET must have one and only one member
|
|
39
|
+
|
|
40
|
+
class AttributeValue(univ.Any):
|
|
41
|
+
pass
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class AttributeValues(univ.SetOf):
|
|
45
|
+
pass
|
|
46
|
+
|
|
47
|
+
AttributeValues.componentType = AttributeValue()
|
|
48
|
+
AttributeValues.sizeSpec = univ.Set.sizeSpec + constraint.ValueSizeConstraint(1, 1)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class SingleAttribute(univ.Sequence):
|
|
52
|
+
pass
|
|
53
|
+
|
|
54
|
+
SingleAttribute.componentType = namedtype.NamedTypes(
|
|
55
|
+
namedtype.NamedType('attrType', univ.ObjectIdentifier()),
|
|
56
|
+
namedtype.NamedType('attrValues', AttributeValues(),
|
|
57
|
+
openType=opentype.OpenType('attrType', cmsAttributesMap)
|
|
58
|
+
)
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
# SIR Entity Name
|
|
63
|
+
|
|
64
|
+
class SIREntityNameType(univ.ObjectIdentifier):
|
|
65
|
+
pass
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
class SIREntityNameValue(univ.Any):
|
|
69
|
+
pass
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
class SIREntityName(univ.Sequence):
|
|
73
|
+
pass
|
|
74
|
+
|
|
75
|
+
SIREntityName.componentType = namedtype.NamedTypes(
|
|
76
|
+
namedtype.NamedType('sirenType', SIREntityNameType()),
|
|
77
|
+
namedtype.NamedType('sirenValue', univ.OctetString())
|
|
78
|
+
# CONTAINING the DER-encoded SIREntityNameValue
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
class SIREntityNames(univ.SequenceOf):
|
|
83
|
+
pass
|
|
84
|
+
|
|
85
|
+
SIREntityNames.componentType = SIREntityName()
|
|
86
|
+
SIREntityNames.sizeSpec=constraint.ValueSizeConstraint(1, MAX)
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
id_dn = univ.ObjectIdentifier('2.16.840.1.101.2.1.16.0')
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
class siren_dn(SIREntityName):
|
|
93
|
+
def __init__(self):
|
|
94
|
+
SIREntityName.__init__(self)
|
|
95
|
+
self['sirenType'] = id_dn
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
# Key Package Error CMS Content Type
|
|
99
|
+
|
|
100
|
+
class EnumeratedErrorCode(univ.Enumerated):
|
|
101
|
+
pass
|
|
102
|
+
|
|
103
|
+
# Error codes with values <= 33 are aligned with RFC 5934
|
|
104
|
+
EnumeratedErrorCode.namedValues = namedval.NamedValues(
|
|
105
|
+
('decodeFailure', 1),
|
|
106
|
+
('badContentInfo', 2),
|
|
107
|
+
('badSignedData', 3),
|
|
108
|
+
('badEncapContent', 4),
|
|
109
|
+
('badCertificate', 5),
|
|
110
|
+
('badSignerInfo', 6),
|
|
111
|
+
('badSignedAttrs', 7),
|
|
112
|
+
('badUnsignedAttrs', 8),
|
|
113
|
+
('missingContent', 9),
|
|
114
|
+
('noTrustAnchor', 10),
|
|
115
|
+
('notAuthorized', 11),
|
|
116
|
+
('badDigestAlgorithm', 12),
|
|
117
|
+
('badSignatureAlgorithm', 13),
|
|
118
|
+
('unsupportedKeySize', 14),
|
|
119
|
+
('unsupportedParameters', 15),
|
|
120
|
+
('signatureFailure', 16),
|
|
121
|
+
('insufficientMemory', 17),
|
|
122
|
+
('incorrectTarget', 23),
|
|
123
|
+
('missingSignature', 29),
|
|
124
|
+
('resourcesBusy', 30),
|
|
125
|
+
('versionNumberMismatch', 31),
|
|
126
|
+
('revokedCertificate', 33),
|
|
127
|
+
('ambiguousDecrypt', 60),
|
|
128
|
+
('noDecryptKey', 61),
|
|
129
|
+
('badEncryptedData', 62),
|
|
130
|
+
('badEnvelopedData', 63),
|
|
131
|
+
('badAuthenticatedData', 64),
|
|
132
|
+
('badAuthEnvelopedData', 65),
|
|
133
|
+
('badKeyAgreeRecipientInfo', 66),
|
|
134
|
+
('badKEKRecipientInfo', 67),
|
|
135
|
+
('badEncryptContent', 68),
|
|
136
|
+
('badEncryptAlgorithm', 69),
|
|
137
|
+
('missingCiphertext', 70),
|
|
138
|
+
('decryptFailure', 71),
|
|
139
|
+
('badMACAlgorithm', 72),
|
|
140
|
+
('badAuthAttrs', 73),
|
|
141
|
+
('badUnauthAttrs', 74),
|
|
142
|
+
('invalidMAC', 75),
|
|
143
|
+
('mismatchedDigestAlg', 76),
|
|
144
|
+
('missingCertificate', 77),
|
|
145
|
+
('tooManySigners', 78),
|
|
146
|
+
('missingSignedAttributes', 79),
|
|
147
|
+
('derEncodingNotUsed', 80),
|
|
148
|
+
('missingContentHints', 81),
|
|
149
|
+
('invalidAttributeLocation', 82),
|
|
150
|
+
('badMessageDigest', 83),
|
|
151
|
+
('badKeyPackage', 84),
|
|
152
|
+
('badAttributes', 85),
|
|
153
|
+
('attributeComparisonFailure', 86),
|
|
154
|
+
('unsupportedSymmetricKeyPackage', 87),
|
|
155
|
+
('unsupportedAsymmetricKeyPackage', 88),
|
|
156
|
+
('constraintViolation', 89),
|
|
157
|
+
('ambiguousDefaultValue', 90),
|
|
158
|
+
('noMatchingRecipientInfo', 91),
|
|
159
|
+
('unsupportedKeyWrapAlgorithm', 92),
|
|
160
|
+
('badKeyTransRecipientInfo', 93),
|
|
161
|
+
('other', 127)
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
class ErrorCodeChoice(univ.Choice):
|
|
166
|
+
pass
|
|
167
|
+
|
|
168
|
+
ErrorCodeChoice.componentType = namedtype.NamedTypes(
|
|
169
|
+
namedtype.NamedType('enum', EnumeratedErrorCode()),
|
|
170
|
+
namedtype.NamedType('oid', univ.ObjectIdentifier())
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
class KeyPkgID(univ.OctetString):
|
|
175
|
+
pass
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
class KeyPkgIdentifier(univ.Choice):
|
|
179
|
+
pass
|
|
180
|
+
|
|
181
|
+
KeyPkgIdentifier.componentType = namedtype.NamedTypes(
|
|
182
|
+
namedtype.NamedType('pkgID', KeyPkgID()),
|
|
183
|
+
namedtype.NamedType('attribute', SingleAttribute())
|
|
184
|
+
)
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
class KeyPkgVersion(univ.Integer):
|
|
188
|
+
pass
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
KeyPkgVersion.namedValues = namedval.NamedValues(
|
|
192
|
+
('v1', 1),
|
|
193
|
+
('v2', 2)
|
|
194
|
+
)
|
|
195
|
+
|
|
196
|
+
KeyPkgVersion.subtypeSpec = constraint.ValueRangeConstraint(1, 65535)
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
id_ct_KP_keyPackageError = univ.ObjectIdentifier('2.16.840.1.101.2.1.2.78.6')
|
|
200
|
+
|
|
201
|
+
class KeyPackageError(univ.Sequence):
|
|
202
|
+
pass
|
|
203
|
+
|
|
204
|
+
KeyPackageError.componentType = namedtype.NamedTypes(
|
|
205
|
+
namedtype.DefaultedNamedType('version', KeyPkgVersion().subtype(value='v2')),
|
|
206
|
+
namedtype.OptionalNamedType('errorOf', KeyPkgIdentifier().subtype(
|
|
207
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0))),
|
|
208
|
+
namedtype.NamedType('errorBy', SIREntityName()),
|
|
209
|
+
namedtype.NamedType('errorCode', ErrorCodeChoice())
|
|
210
|
+
)
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
# Key Package Receipt CMS Content Type
|
|
214
|
+
|
|
215
|
+
id_ct_KP_keyPackageReceipt = univ.ObjectIdentifier('2.16.840.1.101.2.1.2.78.3')
|
|
216
|
+
|
|
217
|
+
class KeyPackageReceipt(univ.Sequence):
|
|
218
|
+
pass
|
|
219
|
+
|
|
220
|
+
KeyPackageReceipt.componentType = namedtype.NamedTypes(
|
|
221
|
+
namedtype.DefaultedNamedType('version', KeyPkgVersion().subtype(value='v2')),
|
|
222
|
+
namedtype.NamedType('receiptOf', KeyPkgIdentifier()),
|
|
223
|
+
namedtype.NamedType('receivedBy', SIREntityName())
|
|
224
|
+
)
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
# Key Package Receipt Request Attribute
|
|
228
|
+
|
|
229
|
+
class KeyPkgReceiptReq(univ.Sequence):
|
|
230
|
+
pass
|
|
231
|
+
|
|
232
|
+
KeyPkgReceiptReq.componentType = namedtype.NamedTypes(
|
|
233
|
+
namedtype.DefaultedNamedType('encryptReceipt', univ.Boolean().subtype(value=0)),
|
|
234
|
+
namedtype.OptionalNamedType('receiptsFrom', SIREntityNames().subtype(
|
|
235
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
|
|
236
|
+
namedtype.NamedType('receiptsTo', SIREntityNames())
|
|
237
|
+
)
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
id_aa_KP_keyPkgIdAndReceiptReq = univ.ObjectIdentifier('2.16.840.1.101.2.1.5.65')
|
|
241
|
+
|
|
242
|
+
class KeyPkgIdentifierAndReceiptReq(univ.Sequence):
|
|
243
|
+
pass
|
|
244
|
+
|
|
245
|
+
KeyPkgIdentifierAndReceiptReq.componentType = namedtype.NamedTypes(
|
|
246
|
+
namedtype.NamedType('pkgID', KeyPkgID()),
|
|
247
|
+
namedtype.OptionalNamedType('receiptReq', KeyPkgReceiptReq())
|
|
248
|
+
)
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
# Update the of CMS Attributes Map
|
|
252
|
+
|
|
253
|
+
_cmsAttributesMapUpdate = {
|
|
254
|
+
id_aa_KP_keyPkgIdAndReceiptReq: KeyPkgIdentifierAndReceiptReq(),
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
cmsAttributesMap.update(_cmsAttributesMapUpdate)
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
# Update the CMS Content Types Maps
|
|
261
|
+
|
|
262
|
+
_cmsContentTypesMapUpdate = {
|
|
263
|
+
id_ct_KP_keyPackageError: KeyPackageError(),
|
|
264
|
+
id_ct_KP_keyPackageReceipt: KeyPackageReceipt(),
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
cmsContentTypesMap.update(_cmsContentTypesMapUpdate)
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file is part of pyasn1-alt-modules software.
|
|
3
|
+
#
|
|
4
|
+
# Created by Russ Housley.
|
|
5
|
+
#
|
|
6
|
+
# Copyright (c) 2019-2024, Vigil Security, LLC
|
|
7
|
+
# License: http://vigilsec.com/pyasn1-alt-modules-license.txt
|
|
8
|
+
#
|
|
9
|
+
# Object Identifiers for Test Certificate Policies
|
|
10
|
+
#
|
|
11
|
+
# ASN.1 source from:
|
|
12
|
+
# https://www.rfc-editor.org/rfc/rfc7229.txt
|
|
13
|
+
#
|
|
14
|
+
|
|
15
|
+
from pyasn1.type import univ
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
id_pkix = univ.ObjectIdentifier('1.3.6.1.5.5.7')
|
|
19
|
+
|
|
20
|
+
id_TEST = id_pkix + (13, )
|
|
21
|
+
|
|
22
|
+
id_TEST_certPolicyOne = id_TEST + (1, )
|
|
23
|
+
id_TEST_certPolicyTwo = id_TEST + (2, )
|
|
24
|
+
id_TEST_certPolicyThree = id_TEST + (3, )
|
|
25
|
+
id_TEST_certPolicyFour = id_TEST + (4, )
|
|
26
|
+
id_TEST_certPolicyFive = id_TEST + (5, )
|
|
27
|
+
id_TEST_certPolicySix = id_TEST + (6, )
|
|
28
|
+
id_TEST_certPolicySeven = id_TEST + (7, )
|
|
29
|
+
id_TEST_certPolicyEight = id_TEST + (8, )
|