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,731 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file is part of pyasn1_alt_modules software.
|
|
3
|
+
#
|
|
4
|
+
# Created by Russ Housley with minor assistance from asn1ate v.0.6.0.
|
|
5
|
+
# Modified by Russ Housley to make InfoTypeAndValue['infoType'] optional.
|
|
6
|
+
# Modified by Russ Housley to update the algorithmIdentifierMap.
|
|
7
|
+
# Modified bt Russ Housley to correct typo in SignKeyPairTypesValue.
|
|
8
|
+
#
|
|
9
|
+
# Copyright (c) 2021-2024, Vigil Security, LLC
|
|
10
|
+
# License: http://vigilsec.com/pyasn1_alt_modules_license.txt
|
|
11
|
+
#
|
|
12
|
+
# Updates to the Certificate Management Protocol (CMP)
|
|
13
|
+
#
|
|
14
|
+
# ASN.1 source from:
|
|
15
|
+
# https://www.rfc_editor.org/rfc/rfc9480.txt
|
|
16
|
+
#
|
|
17
|
+
|
|
18
|
+
from pyasn1.type import char
|
|
19
|
+
from pyasn1.type import constraint
|
|
20
|
+
from pyasn1.type import namedval
|
|
21
|
+
from pyasn1.type import namedtype
|
|
22
|
+
from pyasn1.type import opentype
|
|
23
|
+
from pyasn1.type import tag
|
|
24
|
+
from pyasn1.type import univ
|
|
25
|
+
from pyasn1.type import useful
|
|
26
|
+
|
|
27
|
+
from pyasn1_alt_modules import rfc2985
|
|
28
|
+
from pyasn1_alt_modules import rfc4210
|
|
29
|
+
from pyasn1_alt_modules import rfc4211
|
|
30
|
+
from pyasn1_alt_modules import rfc5280
|
|
31
|
+
from pyasn1_alt_modules import rfc5652
|
|
32
|
+
from pyasn1_alt_modules import rfc6402
|
|
33
|
+
from pyasn1_alt_modules import opentypemap
|
|
34
|
+
|
|
35
|
+
algorithmIdentifierMap = opentypemap.get('algorithmIdentifierMap')
|
|
36
|
+
|
|
37
|
+
cmpInfoTypeAndValueMap = opentypemap.get('cmpInfoTypeAndValueMap')
|
|
38
|
+
|
|
39
|
+
cmsAttributesMap = opentypemap.get('cmsAttributesMap')
|
|
40
|
+
|
|
41
|
+
MAX = float('inf')
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
# Imports from RFC 5280
|
|
45
|
+
|
|
46
|
+
Certificate = rfc5280.Certificate
|
|
47
|
+
|
|
48
|
+
CertificateList = rfc5280.CertificateList
|
|
49
|
+
|
|
50
|
+
DistributionPointName = rfc5280.DistributionPointName
|
|
51
|
+
|
|
52
|
+
Extensions = rfc5280.Extensions
|
|
53
|
+
|
|
54
|
+
Name = rfc5280.Name
|
|
55
|
+
|
|
56
|
+
AlgorithmIdentifier = rfc5280.AlgorithmIdentifier
|
|
57
|
+
|
|
58
|
+
GeneralNames = rfc5280.GeneralNames
|
|
59
|
+
|
|
60
|
+
GeneralName = rfc5280.GeneralName
|
|
61
|
+
|
|
62
|
+
KeyIdentifier = rfc5280.KeyIdentifier
|
|
63
|
+
|
|
64
|
+
Time = rfc5280.Time
|
|
65
|
+
|
|
66
|
+
id_pkix = rfc5280.id_pkix
|
|
67
|
+
|
|
68
|
+
id_kp = rfc5280.id_kp
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
# Imports from RFC 4211
|
|
72
|
+
|
|
73
|
+
CertTemplate = rfc4211.CertTemplate
|
|
74
|
+
|
|
75
|
+
PKIPublicationInfo = rfc4211.PKIPublicationInfo
|
|
76
|
+
|
|
77
|
+
EncryptedKey = rfc4211.EncryptedKey
|
|
78
|
+
|
|
79
|
+
CertId = rfc4211.CertId
|
|
80
|
+
|
|
81
|
+
CertReqMessages = rfc4211.CertReqMessages
|
|
82
|
+
|
|
83
|
+
Controls = rfc4211.Controls
|
|
84
|
+
|
|
85
|
+
AttributeTypeAndValue = rfc4211.AttributeTypeAndValue
|
|
86
|
+
|
|
87
|
+
id_regCtrl = rfc4211.id_regCtrl
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
# Imports from RFC 5652
|
|
91
|
+
|
|
92
|
+
Attribute = rfc5652.Attribute
|
|
93
|
+
|
|
94
|
+
EnvelopedData = rfc5652.EnvelopedData
|
|
95
|
+
|
|
96
|
+
SignedData = rfc5652.SignedData
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
# Imports from RFC 6402
|
|
100
|
+
|
|
101
|
+
CertificationRequest = rfc6402.CertificationRequest
|
|
102
|
+
|
|
103
|
+
id_kp_cmcCA = rfc6402.id_kp_cmcCA
|
|
104
|
+
|
|
105
|
+
id_kp_cmcRA = rfc6402.id_kp_cmcRA
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
# Imports from RFC 2985
|
|
109
|
+
|
|
110
|
+
pkcs_9 = rfc2985.pkcs_9
|
|
111
|
+
|
|
112
|
+
pkcs_9_at_localKeyId = rfc2985.pkcs_9_at_localKeyId
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
# Updates to the Certificate Management Protocol (CMP)
|
|
116
|
+
# Where possible, just import from RFC 4210
|
|
117
|
+
|
|
118
|
+
CMPCertificate = rfc4210.CMPCertificate
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
OOBCert = rfc4210.OOBCert
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
CertAnnContent = rfc4210.CertAnnContent
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
KeyIdentifier = rfc4210.KeyIdentifier
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
PollRepContent = rfc4210.PollRepContent
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
PKIConfirmContent = rfc4210.PKIConfirmContent
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
CRLAnnContent = rfc4210.CRLAnnContent
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
CAKeyUpdAnnContent = rfc4210.CAKeyUpdAnnContent
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
RevDetails = rfc4210.RevDetails
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
RevReqContent = rfc4210.RevReqContent
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
class InfoTypeAndValue(univ.Sequence):
|
|
149
|
+
componentType = namedtype.NamedTypes(
|
|
150
|
+
namedtype.NamedType('infoType', univ.ObjectIdentifier()),
|
|
151
|
+
namedtype.OptionalNamedType('infoValue', univ.Any(),
|
|
152
|
+
openType=opentype.OpenType('infoType', cmpInfoTypeAndValueMap))
|
|
153
|
+
)
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
class GenRepContent(univ.SequenceOf):
|
|
157
|
+
componentType = InfoTypeAndValue()
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
class GenMsgContent(univ.SequenceOf):
|
|
161
|
+
componentType = InfoTypeAndValue()
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
class CertOrEncCert(univ.Choice):
|
|
165
|
+
componentType = namedtype.NamedTypes(
|
|
166
|
+
namedtype.NamedType('certificate', CMPCertificate().subtype(
|
|
167
|
+
explicitTag=tag.Tag(tag.tagClassContext,
|
|
168
|
+
tag.tagFormatConstructed, 0))),
|
|
169
|
+
namedtype.NamedType('encryptedCert', EncryptedKey().subtype(
|
|
170
|
+
explicitTag=tag.Tag(tag.tagClassContext,
|
|
171
|
+
tag.tagFormatSimple, 1)))
|
|
172
|
+
)
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
class CertifiedKeyPair(univ.Sequence):
|
|
176
|
+
componentType = namedtype.NamedTypes(
|
|
177
|
+
namedtype.NamedType('certOrEncCert', CertOrEncCert()),
|
|
178
|
+
namedtype.OptionalNamedType('privateKey',
|
|
179
|
+
EncryptedKey().subtype(explicitTag=tag.Tag(
|
|
180
|
+
tag.tagClassContext, tag.tagFormatSimple, 0))),
|
|
181
|
+
namedtype.OptionalNamedType('publicationInfo',
|
|
182
|
+
PKIPublicationInfo().subtype(explicitTag=tag.Tag(
|
|
183
|
+
tag.tagClassContext, tag.tagFormatSimple, 1)))
|
|
184
|
+
)
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
POPODecKeyRespContent = rfc4210.POPODecKeyRespContent
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
Challenge = rfc4210.Challenge
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
# Added in CMP Updates
|
|
194
|
+
#
|
|
195
|
+
class Rand(univ.Sequence):
|
|
196
|
+
componentType = namedtype.NamedTypes(
|
|
197
|
+
namedtype.NamedType('int', univ.Integer()),
|
|
198
|
+
namedtype.NamedType('sender', GeneralName())
|
|
199
|
+
)
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
PKIStatus = rfc4210.PKIStatus
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
PKIFailureInfo = rfc4210.PKIFailureInfo
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
RevAnnContent = rfc4210.RevAnnContent
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
RevRepContent = rfc4210.RevRepContent
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
KeyRecRepContent = rfc4210.KeyRecRepContent
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
CertResponse = rfc4210.CertResponse
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
CertRepMessage = rfc4210.CertRepMessage
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
POPODecKeyChallContent = rfc4210.POPODecKeyChallContent
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
OOBCertHash = rfc4210.OOBCertHash
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
DHBMParameter = rfc4210.DHBMParameter
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
PBMParameter = rfc4210.PBMParameter
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
PKIProtection = rfc4210.PKIProtection
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
class PKIFreeText(univ.SequenceOf):
|
|
239
|
+
componentType = char.UTF8String()
|
|
240
|
+
subtypeSpec = constraint.ValueSizeConstraint(1, MAX)
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
class PKIStatusInfo(univ.Sequence):
|
|
244
|
+
componentType = namedtype.NamedTypes(
|
|
245
|
+
namedtype.NamedType('status', PKIStatus()),
|
|
246
|
+
namedtype.OptionalNamedType('statusString', PKIFreeText()),
|
|
247
|
+
namedtype.OptionalNamedType('failInfo', PKIFailureInfo())
|
|
248
|
+
)
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
class ErrorMsgContent(univ.Sequence):
|
|
252
|
+
componentType = namedtype.NamedTypes(
|
|
253
|
+
namedtype.NamedType('pKIStatusInfo', PKIStatusInfo()),
|
|
254
|
+
namedtype.OptionalNamedType('errorCode', univ.Integer()),
|
|
255
|
+
namedtype.OptionalNamedType('errorDetails', PKIFreeText())
|
|
256
|
+
)
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
PollReqContent = rfc4210.PollReqContent
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
class PollRepContent(univ.SequenceOf):
|
|
263
|
+
componentType = univ.Sequence(componentType=namedtype.NamedTypes(
|
|
264
|
+
namedtype.NamedType('certReqId', univ.Integer()),
|
|
265
|
+
namedtype.NamedType('checkAfter', univ.Integer()),
|
|
266
|
+
namedtype.OptionalNamedType('reason', PKIFreeText())
|
|
267
|
+
))
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
class CertStatus(univ.Sequence):
|
|
271
|
+
componentType = namedtype.NamedTypes(
|
|
272
|
+
namedtype.OptionalNamedType('hashAlg',
|
|
273
|
+
AlgorithmIdentifier().subtype(explicitTag=tag.Tag(
|
|
274
|
+
tag.tagClassContext, tag.tagFormatSimple, 0))),
|
|
275
|
+
namedtype.NamedType('certHash', univ.OctetString()),
|
|
276
|
+
namedtype.NamedType('certReqId', univ.Integer()),
|
|
277
|
+
namedtype.OptionalNamedType('statusInfo', PKIStatusInfo())
|
|
278
|
+
)
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
class CertConfirmContent(univ.SequenceOf):
|
|
282
|
+
componentType = CertStatus()
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
class PKIHeader(univ.Sequence):
|
|
286
|
+
componentType = namedtype.NamedTypes(
|
|
287
|
+
namedtype.NamedType('pvno', univ.Integer(
|
|
288
|
+
namedValues=namedval.NamedValues(
|
|
289
|
+
('cmp1999', 1), ('cmp2000', 2), ('cmp2021', 3)))),
|
|
290
|
+
namedtype.NamedType('sender', GeneralName()),
|
|
291
|
+
namedtype.NamedType('recipient', GeneralName()),
|
|
292
|
+
namedtype.OptionalNamedType('messageTime',
|
|
293
|
+
useful.GeneralizedTime().subtype(explicitTag=tag.Tag(
|
|
294
|
+
tag.tagClassContext, tag.tagFormatSimple, 0))),
|
|
295
|
+
namedtype.OptionalNamedType('protectionAlg',
|
|
296
|
+
AlgorithmIdentifier().subtype(explicitTag=tag.Tag(
|
|
297
|
+
tag.tagClassContext, tag.tagFormatSimple, 1))),
|
|
298
|
+
namedtype.OptionalNamedType('senderKID',
|
|
299
|
+
KeyIdentifier().subtype(explicitTag=tag.Tag(
|
|
300
|
+
tag.tagClassContext, tag.tagFormatSimple, 2))),
|
|
301
|
+
namedtype.OptionalNamedType('recipKID',
|
|
302
|
+
KeyIdentifier().subtype(explicitTag=tag.Tag(
|
|
303
|
+
tag.tagClassContext, tag.tagFormatSimple, 3))),
|
|
304
|
+
namedtype.OptionalNamedType('transactionID',
|
|
305
|
+
univ.OctetString().subtype(explicitTag=tag.Tag(
|
|
306
|
+
tag.tagClassContext, tag.tagFormatSimple, 4))),
|
|
307
|
+
namedtype.OptionalNamedType('senderNonce',
|
|
308
|
+
univ.OctetString().subtype(explicitTag=tag.Tag(
|
|
309
|
+
tag.tagClassContext, tag.tagFormatSimple, 5))),
|
|
310
|
+
namedtype.OptionalNamedType('recipNonce',
|
|
311
|
+
univ.OctetString().subtype(explicitTag=tag.Tag(
|
|
312
|
+
tag.tagClassContext, tag.tagFormatSimple, 6))),
|
|
313
|
+
namedtype.OptionalNamedType('freeText',
|
|
314
|
+
PKIFreeText().subtype(explicitTag=tag.Tag(
|
|
315
|
+
tag.tagClassContext, tag.tagFormatSimple, 7))),
|
|
316
|
+
namedtype.OptionalNamedType('generalInfo',
|
|
317
|
+
univ.SequenceOf(componentType=InfoTypeAndValue()).subtype(
|
|
318
|
+
subtypeSpec=constraint.ValueSizeConstraint(1, MAX)).subtype(
|
|
319
|
+
explicitTag=tag.Tag(tag.tagClassContext,
|
|
320
|
+
tag.tagFormatSimple, 8)))
|
|
321
|
+
)
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
# Since pyasn1 does not naturally handle recursive definitions, this hack
|
|
325
|
+
# instead of:
|
|
326
|
+
# class NestedMessageContent(PKIMessages):
|
|
327
|
+
# pass
|
|
328
|
+
# Note that there is a second part of the hack at the bottom of the module.
|
|
329
|
+
#
|
|
330
|
+
class NestedMessageContent(univ.SequenceOf):
|
|
331
|
+
componentType = univ.Any()
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
nestedMessageContent = NestedMessageContent().subtype(
|
|
335
|
+
explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 20))
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
class PKIBody(univ.Choice):
|
|
339
|
+
componentType = namedtype.NamedTypes(
|
|
340
|
+
namedtype.NamedType('ir', CertReqMessages().subtype(
|
|
341
|
+
explicitTag=tag.Tag(tag.tagClassContext,
|
|
342
|
+
tag.tagFormatSimple, 0))),
|
|
343
|
+
namedtype.NamedType('ip', CertRepMessage().subtype(
|
|
344
|
+
explicitTag=tag.Tag(tag.tagClassContext,
|
|
345
|
+
tag.tagFormatConstructed, 1))),
|
|
346
|
+
namedtype.NamedType('cr', CertReqMessages().subtype(
|
|
347
|
+
explicitTag=tag.Tag(tag.tagClassContext,
|
|
348
|
+
tag.tagFormatSimple, 2))),
|
|
349
|
+
namedtype.NamedType('cp', CertRepMessage().subtype(
|
|
350
|
+
explicitTag=tag.Tag(tag.tagClassContext,
|
|
351
|
+
tag.tagFormatConstructed, 3))),
|
|
352
|
+
namedtype.NamedType('p10cr', CertificationRequest().subtype(
|
|
353
|
+
explicitTag=tag.Tag(tag.tagClassContext,
|
|
354
|
+
tag.tagFormatSimple, 4))),
|
|
355
|
+
namedtype.NamedType('popdecc', POPODecKeyChallContent().subtype(
|
|
356
|
+
explicitTag=tag.Tag(tag.tagClassContext,
|
|
357
|
+
tag.tagFormatSimple, 5))),
|
|
358
|
+
namedtype.NamedType('popdecr', POPODecKeyRespContent().subtype(
|
|
359
|
+
explicitTag=tag.Tag(tag.tagClassContext,
|
|
360
|
+
tag.tagFormatSimple, 6))),
|
|
361
|
+
namedtype.NamedType('kur', CertReqMessages().subtype(
|
|
362
|
+
explicitTag=tag.Tag(tag.tagClassContext,
|
|
363
|
+
tag.tagFormatSimple, 7))),
|
|
364
|
+
namedtype.NamedType('kup', CertRepMessage().subtype(
|
|
365
|
+
explicitTag=tag.Tag(tag.tagClassContext,
|
|
366
|
+
tag.tagFormatConstructed, 8))),
|
|
367
|
+
namedtype.NamedType('krr', CertReqMessages().subtype(
|
|
368
|
+
explicitTag=tag.Tag(tag.tagClassContext,
|
|
369
|
+
tag.tagFormatSimple, 9))),
|
|
370
|
+
namedtype.NamedType('krp', KeyRecRepContent().subtype(
|
|
371
|
+
explicitTag=tag.Tag(tag.tagClassContext,
|
|
372
|
+
tag.tagFormatConstructed, 10))),
|
|
373
|
+
namedtype.NamedType('rr', RevReqContent().subtype(
|
|
374
|
+
explicitTag=tag.Tag(tag.tagClassContext,
|
|
375
|
+
tag.tagFormatSimple, 11))),
|
|
376
|
+
namedtype.NamedType('rp', RevRepContent().subtype(
|
|
377
|
+
explicitTag=tag.Tag(tag.tagClassContext,
|
|
378
|
+
tag.tagFormatConstructed, 12))),
|
|
379
|
+
namedtype.NamedType('ccr', CertReqMessages().subtype(
|
|
380
|
+
explicitTag=tag.Tag(tag.tagClassContext,
|
|
381
|
+
tag.tagFormatSimple, 13))),
|
|
382
|
+
namedtype.NamedType('ccp', CertRepMessage().subtype(
|
|
383
|
+
explicitTag=tag.Tag(tag.tagClassContext,
|
|
384
|
+
tag.tagFormatConstructed, 14))),
|
|
385
|
+
namedtype.NamedType('ckuann', CAKeyUpdAnnContent().subtype(
|
|
386
|
+
explicitTag=tag.Tag(tag.tagClassContext,
|
|
387
|
+
tag.tagFormatConstructed, 15))),
|
|
388
|
+
namedtype.NamedType('cann', CertAnnContent().subtype(
|
|
389
|
+
explicitTag=tag.Tag(tag.tagClassContext,
|
|
390
|
+
tag.tagFormatConstructed, 16))),
|
|
391
|
+
namedtype.NamedType('rann', RevAnnContent().subtype(
|
|
392
|
+
explicitTag=tag.Tag(tag.tagClassContext,
|
|
393
|
+
tag.tagFormatConstructed, 17))),
|
|
394
|
+
namedtype.NamedType('crlann', CRLAnnContent().subtype(
|
|
395
|
+
explicitTag=tag.Tag(tag.tagClassContext,
|
|
396
|
+
tag.tagFormatSimple, 18))),
|
|
397
|
+
namedtype.NamedType('pkiconf', PKIConfirmContent().subtype(
|
|
398
|
+
explicitTag=tag.Tag(tag.tagClassContext,
|
|
399
|
+
tag.tagFormatSimple, 19))),
|
|
400
|
+
namedtype.NamedType('nested', nestedMessageContent),
|
|
401
|
+
namedtype.NamedType('genm', GenMsgContent().subtype(
|
|
402
|
+
explicitTag=tag.Tag(tag.tagClassContext,
|
|
403
|
+
tag.tagFormatSimple, 21))),
|
|
404
|
+
namedtype.NamedType('genp', GenRepContent().subtype(
|
|
405
|
+
explicitTag=tag.Tag(tag.tagClassContext,
|
|
406
|
+
tag.tagFormatSimple, 22))),
|
|
407
|
+
namedtype.NamedType('error', ErrorMsgContent().subtype(
|
|
408
|
+
explicitTag=tag.Tag(tag.tagClassContext,
|
|
409
|
+
tag.tagFormatConstructed, 23))),
|
|
410
|
+
namedtype.NamedType('certConf', CertConfirmContent().subtype(
|
|
411
|
+
explicitTag=tag.Tag(tag.tagClassContext,
|
|
412
|
+
tag.tagFormatSimple, 24))),
|
|
413
|
+
namedtype.NamedType('pollReq', PollReqContent().subtype(
|
|
414
|
+
explicitTag=tag.Tag(tag.tagClassContext,
|
|
415
|
+
tag.tagFormatSimple, 25))),
|
|
416
|
+
namedtype.NamedType('pollRep', PollRepContent().subtype(
|
|
417
|
+
explicitTag=tag.Tag(tag.tagClassContext,
|
|
418
|
+
tag.tagFormatSimple, 26)))
|
|
419
|
+
)
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
class PKIMessage(univ.Sequence):
|
|
423
|
+
componentType = namedtype.NamedTypes(
|
|
424
|
+
namedtype.NamedType('header', PKIHeader()),
|
|
425
|
+
namedtype.NamedType('body', PKIBody()),
|
|
426
|
+
namedtype.OptionalNamedType('protection', PKIProtection().subtype(
|
|
427
|
+
explicitTag=tag.Tag(tag.tagClassContext,
|
|
428
|
+
tag.tagFormatSimple, 0))),
|
|
429
|
+
namedtype.OptionalNamedType('extraCerts', univ.SequenceOf(
|
|
430
|
+
componentType=CMPCertificate()).subtype(
|
|
431
|
+
subtypeSpec=constraint.ValueSizeConstraint(1, MAX)).subtype(
|
|
432
|
+
explicitTag=tag.Tag(tag.tagClassContext,
|
|
433
|
+
tag.tagFormatSimple, 1)))
|
|
434
|
+
)
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
class PKIMessages(univ.SequenceOf):
|
|
438
|
+
componentType = PKIMessage()
|
|
439
|
+
subtypeSpec=constraint.ValueSizeConstraint(1, MAX)
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
class ProtectedPart(univ.Sequence):
|
|
443
|
+
componentType = namedtype.NamedTypes(
|
|
444
|
+
namedtype.NamedType('header', PKIHeader()),
|
|
445
|
+
namedtype.NamedType('body', PKIBody())
|
|
446
|
+
)
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
# Added in CMP Updates
|
|
450
|
+
#
|
|
451
|
+
class RootCaKeyUpdateContent(univ.Sequence):
|
|
452
|
+
componentType = namedtype.NamedTypes(
|
|
453
|
+
namedtype.NamedType('newWithNew', CMPCertificate()),
|
|
454
|
+
namedtype.OptionalNamedType('newWithOld', CMPCertificate().subtype(
|
|
455
|
+
explicitTag=tag.Tag(tag.tagClassContext,
|
|
456
|
+
tag.tagFormatConstructed, 0))),
|
|
457
|
+
namedtype.OptionalNamedType('oldWithNew', CMPCertificate().subtype(
|
|
458
|
+
explicitTag=tag.Tag(tag.tagClassContext,
|
|
459
|
+
tag.tagFormatConstructed, 1)))
|
|
460
|
+
)
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
# Added in CMP Updates
|
|
464
|
+
#
|
|
465
|
+
class CRLSource(univ.Choice):
|
|
466
|
+
componentType = namedtype.NamedTypes(
|
|
467
|
+
namedtype.NamedType('dpn', DistributionPointName().subtype(
|
|
468
|
+
explicitTag=tag.Tag(tag.tagClassContext,
|
|
469
|
+
tag.tagFormatConstructed, 0))),
|
|
470
|
+
namedtype.NamedType('issuer', EncryptedKey().subtype(
|
|
471
|
+
explicitTag=tag.Tag(tag.tagClassContext,
|
|
472
|
+
tag.tagFormatConstructed, 1)))
|
|
473
|
+
)
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
# Added in CMP Updates
|
|
477
|
+
#
|
|
478
|
+
class CRLStatus(univ.Sequence):
|
|
479
|
+
componentType = namedtype.NamedTypes(
|
|
480
|
+
namedtype.NamedType('source', CRLSource()),
|
|
481
|
+
namedtype.OptionalNamedType('thisUpdate', Time())
|
|
482
|
+
)
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
# Added in CMP Updates
|
|
486
|
+
#
|
|
487
|
+
class CertReqTemplateContent(univ.Sequence):
|
|
488
|
+
componentType = namedtype.NamedTypes(
|
|
489
|
+
namedtype.NamedType('certTemplate', CertTemplate()),
|
|
490
|
+
namedtype.OptionalNamedType('keySpec', Controls())
|
|
491
|
+
)
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
# Object Identifiers for MAC algorithms
|
|
495
|
+
|
|
496
|
+
id_DHBasedMac = rfc4210.id_DHBasedMac
|
|
497
|
+
|
|
498
|
+
id_PasswordBasedMac = rfc4210.id_PasswordBasedMac
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
# Extended Key Usage extension for PKI entities used in CMP operations
|
|
502
|
+
|
|
503
|
+
id_kp_cmKGA = id_kp + (32,)
|
|
504
|
+
|
|
505
|
+
|
|
506
|
+
# The value for the LocalKeyId Attribute from PKCS#9 (RFC 2985)
|
|
507
|
+
|
|
508
|
+
class LocalKeyIdValue(univ.OctetString):
|
|
509
|
+
pass
|
|
510
|
+
|
|
511
|
+
|
|
512
|
+
# Additional CRMF Registration Controls
|
|
513
|
+
|
|
514
|
+
id_regCtrl_altCertTemplate = id_regCtrl + (7,)
|
|
515
|
+
|
|
516
|
+
class AltCertTemplate(AttributeTypeAndValue):
|
|
517
|
+
pass
|
|
518
|
+
|
|
519
|
+
|
|
520
|
+
id_regCtrl_algId = id_regCtrl + (11,)
|
|
521
|
+
|
|
522
|
+
class AlgIdCtrl(AlgorithmIdentifier):
|
|
523
|
+
pass
|
|
524
|
+
|
|
525
|
+
|
|
526
|
+
id_regCtrl_rsaKeyLen = id_regCtrl + (12,)
|
|
527
|
+
|
|
528
|
+
class RsaKeyLenCtrl(univ.Integer):
|
|
529
|
+
subtypeSpec = constraint.ValueRangeConstraint(1, MAX)
|
|
530
|
+
|
|
531
|
+
|
|
532
|
+
# CMP Information Types
|
|
533
|
+
|
|
534
|
+
id_it = id_pkix + (4,)
|
|
535
|
+
|
|
536
|
+
id_it_caProtEncCert = id_it + (1,)
|
|
537
|
+
|
|
538
|
+
class CAProtEncCertValue(CMPCertificate):
|
|
539
|
+
pass
|
|
540
|
+
|
|
541
|
+
|
|
542
|
+
id_it_signKeyPairTypes = id_it + (2,)
|
|
543
|
+
|
|
544
|
+
class SignKeyPairTypesValue(univ.SequenceOf):
|
|
545
|
+
componentType = AlgorithmIdentifier()
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
id_it_encKeyPairTypes = id_it + (3,)
|
|
549
|
+
|
|
550
|
+
class EncKeyPairTypesValue(univ.SequenceOf):
|
|
551
|
+
componentType = AlgorithmIdentifier()
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
id_it_preferredSymmAlg = id_it + (4,)
|
|
555
|
+
|
|
556
|
+
class PreferredSymmAlgValue(AlgorithmIdentifier):
|
|
557
|
+
pass
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
id_it_caKeyUpdateInfo = id_it + (5,)
|
|
561
|
+
|
|
562
|
+
class CAKeyUpdateInfoValue(CAKeyUpdAnnContent):
|
|
563
|
+
pass
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
id_it_currentCRL = id_it + (6,)
|
|
567
|
+
|
|
568
|
+
class CurrentCRLValue(CertificateList):
|
|
569
|
+
pass
|
|
570
|
+
|
|
571
|
+
|
|
572
|
+
id_it_unsupportedOIDs = id_it + (7,)
|
|
573
|
+
|
|
574
|
+
class UnsupportedOIDsValue(univ.SequenceOf):
|
|
575
|
+
componentType = univ.ObjectIdentifier()
|
|
576
|
+
|
|
577
|
+
|
|
578
|
+
id_it_keyPairParamReq = id_it + (10,)
|
|
579
|
+
|
|
580
|
+
class KeyPairParamReqValue(univ.ObjectIdentifier):
|
|
581
|
+
pass
|
|
582
|
+
|
|
583
|
+
|
|
584
|
+
id_it_keyPairParamRep = id_it + (11,)
|
|
585
|
+
|
|
586
|
+
class KeyPairParamRepValue(AlgorithmIdentifier):
|
|
587
|
+
pass
|
|
588
|
+
|
|
589
|
+
|
|
590
|
+
id_it_revPassphrase = id_it + (12,)
|
|
591
|
+
|
|
592
|
+
class RevPassphraseValue(EncryptedKey):
|
|
593
|
+
pass
|
|
594
|
+
|
|
595
|
+
|
|
596
|
+
id_it_implicitConfirm = id_it + (13,)
|
|
597
|
+
|
|
598
|
+
class ImplicitConfirmValue(univ.Null):
|
|
599
|
+
pass
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
id_it_confirmWaitTime = id_it + (14,)
|
|
603
|
+
|
|
604
|
+
class ConfirmWaitTimeValue(useful.GeneralizedTime):
|
|
605
|
+
pass
|
|
606
|
+
|
|
607
|
+
|
|
608
|
+
id_it_origPKIMessage = id_it + (15,)
|
|
609
|
+
|
|
610
|
+
class OrigPKIMessageValue(PKIMessages):
|
|
611
|
+
pass
|
|
612
|
+
|
|
613
|
+
|
|
614
|
+
id_it_suppLangTags = id_it + (16,)
|
|
615
|
+
|
|
616
|
+
class SuppLangTagsValue(univ.SequenceOf):
|
|
617
|
+
componentType = char.UTF8String()
|
|
618
|
+
|
|
619
|
+
|
|
620
|
+
# Added in CMP Updates
|
|
621
|
+
#
|
|
622
|
+
id_it_caCerts = id_it + (17,)
|
|
623
|
+
|
|
624
|
+
class CaCertsValue(univ.SequenceOf):
|
|
625
|
+
componentType = CMPCertificate()
|
|
626
|
+
|
|
627
|
+
|
|
628
|
+
# Added in CMP Updates
|
|
629
|
+
#
|
|
630
|
+
id_it_rootCaKeyUpdate = id_it + (18,)
|
|
631
|
+
|
|
632
|
+
class RootCaKeyUpdateValue(RootCaKeyUpdateContent):
|
|
633
|
+
pass
|
|
634
|
+
|
|
635
|
+
|
|
636
|
+
# Added in CMP Updates
|
|
637
|
+
#
|
|
638
|
+
id_it_certReqTemplate = id_it + (19,)
|
|
639
|
+
|
|
640
|
+
class CertReqTemplateValue(CertReqTemplateContent):
|
|
641
|
+
pass
|
|
642
|
+
|
|
643
|
+
|
|
644
|
+
# Added in CMP Updates
|
|
645
|
+
#
|
|
646
|
+
id_it_rootCaCert = id_it + (20,)
|
|
647
|
+
|
|
648
|
+
class RootCaCertValue(CMPCertificate):
|
|
649
|
+
pass
|
|
650
|
+
|
|
651
|
+
|
|
652
|
+
# Added in CMP Updates
|
|
653
|
+
#
|
|
654
|
+
id_it_certProfile = id_it + (21,)
|
|
655
|
+
|
|
656
|
+
class CertProfileValue(char.UTF8String):
|
|
657
|
+
pass
|
|
658
|
+
|
|
659
|
+
|
|
660
|
+
# Added in CMP Updates
|
|
661
|
+
#
|
|
662
|
+
id_it_crlStatusList = id_it + (22,)
|
|
663
|
+
|
|
664
|
+
class CRLStatusListValue(univ.SequenceOf):
|
|
665
|
+
componentType = CRLStatus()
|
|
666
|
+
subtypeSpec = constraint.ValueSizeConstraint(1, MAX)
|
|
667
|
+
|
|
668
|
+
|
|
669
|
+
# Added in CMP Updates
|
|
670
|
+
#
|
|
671
|
+
id_it_crls = id_it + (23,)
|
|
672
|
+
|
|
673
|
+
class CRLsValue(univ.SequenceOf):
|
|
674
|
+
componentType = CertificateList()
|
|
675
|
+
subtypeSpec = constraint.ValueSizeConstraint(1, MAX)
|
|
676
|
+
|
|
677
|
+
|
|
678
|
+
# Update the CMP Information Types Map
|
|
679
|
+
|
|
680
|
+
_cmpInfoTypeAndValueMapUpdate = {
|
|
681
|
+
id_it_caProtEncCert: CAProtEncCertValue(),
|
|
682
|
+
id_it_signKeyPairTypes: SignKeyPairTypesValue(),
|
|
683
|
+
id_it_encKeyPairTypes: EncKeyPairTypesValue(),
|
|
684
|
+
id_it_preferredSymmAlg: PreferredSymmAlgValue(),
|
|
685
|
+
id_it_caKeyUpdateInfo: CAKeyUpdateInfoValue(),
|
|
686
|
+
id_it_currentCRL: CurrentCRLValue(),
|
|
687
|
+
id_it_unsupportedOIDs: UnsupportedOIDsValue(),
|
|
688
|
+
id_it_keyPairParamReq: KeyPairParamReqValue(),
|
|
689
|
+
id_it_keyPairParamRep: KeyPairParamRepValue(),
|
|
690
|
+
id_it_revPassphrase: RevPassphraseValue(),
|
|
691
|
+
id_it_implicitConfirm: ImplicitConfirmValue(),
|
|
692
|
+
id_it_confirmWaitTime: ConfirmWaitTimeValue(),
|
|
693
|
+
id_it_origPKIMessage: OrigPKIMessageValue(),
|
|
694
|
+
id_it_suppLangTags: SuppLangTagsValue(),
|
|
695
|
+
id_it_caCerts: CaCertsValue(),
|
|
696
|
+
id_it_rootCaKeyUpdate: RootCaKeyUpdateValue(),
|
|
697
|
+
id_it_certReqTemplate: CertReqTemplateValue(),
|
|
698
|
+
id_it_rootCaCert: RootCaCertValue(),
|
|
699
|
+
id_it_certProfile: CertProfileValue(),
|
|
700
|
+
id_it_crlStatusList: CRLStatusListValue(),
|
|
701
|
+
id_it_crls: CRLsValue(),
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
cmpInfoTypeAndValueMap.update(_cmpInfoTypeAndValueMapUpdate)
|
|
705
|
+
|
|
706
|
+
|
|
707
|
+
# Update the CMS Attribute Map
|
|
708
|
+
|
|
709
|
+
_cmsAttributesMapUpdate = {
|
|
710
|
+
id_regCtrl_altCertTemplate: AltCertTemplate(),
|
|
711
|
+
id_regCtrl_algId: AlgIdCtrl(),
|
|
712
|
+
id_regCtrl_rsaKeyLen: RsaKeyLenCtrl(),
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
cmsAttributesMap.update(_cmsAttributesMapUpdate)
|
|
716
|
+
|
|
717
|
+
|
|
718
|
+
# Update the Algorithm Identifier map
|
|
719
|
+
|
|
720
|
+
_algorithmIdentifierMapUpdate = {
|
|
721
|
+
id_PasswordBasedMac: PBMParameter(),
|
|
722
|
+
id_DHBasedMac: DHBMParameter(),
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
algorithmIdentifierMap.update(_algorithmIdentifierMapUpdate)
|
|
726
|
+
|
|
727
|
+
|
|
728
|
+
# Since pyasn1 does not naturally handle recursive definitions, this hack:
|
|
729
|
+
#
|
|
730
|
+
NestedMessageContent._componentType = PKIMessages()
|
|
731
|
+
nestedMessageContent._componentType = PKIMessages()
|