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,359 @@
|
|
|
1
|
+
# This file is part of pyasn1-alt-modules software.
|
|
2
|
+
#
|
|
3
|
+
# Created by Russ Housley with assistance from the asn1ate tool.
|
|
4
|
+
# Modified by Russ Housley to include the opentypemap manager.
|
|
5
|
+
#
|
|
6
|
+
# Copyright (c) 2019-2024, Vigil Security, LLC
|
|
7
|
+
# License: http://vigilsec.com/pyasn1-alt-modules-license.txt
|
|
8
|
+
#
|
|
9
|
+
# PKCS #12: Personal Information Exchange Syntax v1.1
|
|
10
|
+
#
|
|
11
|
+
# ASN.1 source from:
|
|
12
|
+
# https://www.rfc-editor.org/rfc/rfc7292.txt
|
|
13
|
+
# https://www.rfc-editor.org/errata_search.php?rfc=7292
|
|
14
|
+
|
|
15
|
+
from pyasn1.type import char
|
|
16
|
+
from pyasn1.type import constraint
|
|
17
|
+
from pyasn1.type import namedtype
|
|
18
|
+
from pyasn1.type import namedval
|
|
19
|
+
from pyasn1.type import opentype
|
|
20
|
+
from pyasn1.type import tag
|
|
21
|
+
from pyasn1.type import univ
|
|
22
|
+
|
|
23
|
+
from pyasn1_alt_modules import rfc2315
|
|
24
|
+
from pyasn1_alt_modules import rfc5652
|
|
25
|
+
from pyasn1_alt_modules import rfc5958
|
|
26
|
+
from pyasn1_alt_modules import opentypemap
|
|
27
|
+
|
|
28
|
+
algorithmIdentifierMap = opentypemap.get('algorithmIdentifierMap')
|
|
29
|
+
|
|
30
|
+
cmsAttributesMap = opentypemap.get('cmsAttributesMap')
|
|
31
|
+
|
|
32
|
+
pkcs12BagTypeMap = opentypemap.get('pkcs12BagTypeMap')
|
|
33
|
+
|
|
34
|
+
pkcs12CertBagMap = opentypemap.get('pkcs12CertBagMap')
|
|
35
|
+
|
|
36
|
+
pkcs12CRLBagMap = opentypemap.get('pkcs12CRLBagMap')
|
|
37
|
+
|
|
38
|
+
pkcs12SecretBagMap = opentypemap.get('pkcs12SecretBagMap')
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def _OID(*components):
|
|
42
|
+
output = []
|
|
43
|
+
for x in tuple(components):
|
|
44
|
+
if isinstance(x, univ.ObjectIdentifier):
|
|
45
|
+
output.extend(list(x))
|
|
46
|
+
else:
|
|
47
|
+
output.append(int(x))
|
|
48
|
+
|
|
49
|
+
return univ.ObjectIdentifier(output)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
# Imports from RFC 2315, RFC 5652, and RFC 5958
|
|
53
|
+
|
|
54
|
+
DigestInfo = rfc2315.DigestInfo
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
ContentInfo = rfc5652.ContentInfo
|
|
58
|
+
|
|
59
|
+
PKCS12Attribute = rfc5652.Attribute
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
EncryptedPrivateKeyInfo = rfc5958.EncryptedPrivateKeyInfo
|
|
63
|
+
|
|
64
|
+
PrivateKeyInfo = rfc5958.PrivateKeyInfo
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
# CMSSingleAttribute is the same as Attribute in RFC 5652 except the attrValues
|
|
68
|
+
# SET must have one and only one member
|
|
69
|
+
|
|
70
|
+
class AttributeType(univ.ObjectIdentifier):
|
|
71
|
+
pass
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
class AttributeValue(univ.Any):
|
|
75
|
+
pass
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class AttributeValues(univ.SetOf):
|
|
79
|
+
pass
|
|
80
|
+
|
|
81
|
+
AttributeValues.componentType = AttributeValue()
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
class CMSSingleAttribute(univ.Sequence):
|
|
85
|
+
pass
|
|
86
|
+
|
|
87
|
+
CMSSingleAttribute.componentType = namedtype.NamedTypes(
|
|
88
|
+
namedtype.NamedType('attrType', AttributeType()),
|
|
89
|
+
namedtype.NamedType('attrValues',
|
|
90
|
+
AttributeValues().subtype(sizeSpec=constraint.ValueSizeConstraint(1, 1)),
|
|
91
|
+
openType=opentype.OpenType('attrType', cmsAttributesMap)
|
|
92
|
+
)
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
# Object identifier arcs
|
|
97
|
+
|
|
98
|
+
rsadsi = _OID(1, 2, 840, 113549)
|
|
99
|
+
|
|
100
|
+
pkcs = _OID(rsadsi, 1)
|
|
101
|
+
|
|
102
|
+
pkcs_9 = _OID(pkcs, 9)
|
|
103
|
+
|
|
104
|
+
certTypes = _OID(pkcs_9, 22)
|
|
105
|
+
|
|
106
|
+
crlTypes = _OID(pkcs_9, 23)
|
|
107
|
+
|
|
108
|
+
pkcs_12 = _OID(pkcs, 12)
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
# PBE Algorithm Identifiers and Parameters Structure
|
|
112
|
+
|
|
113
|
+
pkcs_12PbeIds = _OID(pkcs_12, 1)
|
|
114
|
+
|
|
115
|
+
pbeWithSHAAnd128BitRC4 = _OID(pkcs_12PbeIds, 1)
|
|
116
|
+
|
|
117
|
+
pbeWithSHAAnd40BitRC4 = _OID(pkcs_12PbeIds, 2)
|
|
118
|
+
|
|
119
|
+
pbeWithSHAAnd3_KeyTripleDES_CBC = _OID(pkcs_12PbeIds, 3)
|
|
120
|
+
|
|
121
|
+
pbeWithSHAAnd2_KeyTripleDES_CBC = _OID(pkcs_12PbeIds, 4)
|
|
122
|
+
|
|
123
|
+
pbeWithSHAAnd128BitRC2_CBC = _OID(pkcs_12PbeIds, 5)
|
|
124
|
+
|
|
125
|
+
pbeWithSHAAnd40BitRC2_CBC = _OID(pkcs_12PbeIds, 6)
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
class Pkcs_12PbeParams(univ.Sequence):
|
|
129
|
+
pass
|
|
130
|
+
|
|
131
|
+
Pkcs_12PbeParams.componentType = namedtype.NamedTypes(
|
|
132
|
+
namedtype.NamedType('salt', univ.OctetString()),
|
|
133
|
+
namedtype.NamedType('iterations', univ.Integer())
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
# Bag types
|
|
138
|
+
|
|
139
|
+
bagtypes = _OID(pkcs_12, 10, 1)
|
|
140
|
+
|
|
141
|
+
class BAG_TYPE(univ.Sequence):
|
|
142
|
+
pass
|
|
143
|
+
|
|
144
|
+
BAG_TYPE.componentType = namedtype.NamedTypes(
|
|
145
|
+
namedtype.NamedType('id', univ.ObjectIdentifier()),
|
|
146
|
+
namedtype.NamedType('unnamed1', univ.Any(),
|
|
147
|
+
openType=opentype.OpenType('attrType', pkcs12BagTypeMap)
|
|
148
|
+
)
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
id_keyBag = _OID(bagtypes, 1)
|
|
153
|
+
|
|
154
|
+
class KeyBag(PrivateKeyInfo):
|
|
155
|
+
pass
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
id_pkcs8ShroudedKeyBag = _OID(bagtypes, 2)
|
|
159
|
+
|
|
160
|
+
class PKCS8ShroudedKeyBag(EncryptedPrivateKeyInfo):
|
|
161
|
+
pass
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
id_certBag = _OID(bagtypes, 3)
|
|
165
|
+
|
|
166
|
+
class CertBag(univ.Sequence):
|
|
167
|
+
pass
|
|
168
|
+
|
|
169
|
+
CertBag.componentType = namedtype.NamedTypes(
|
|
170
|
+
namedtype.NamedType('certId', univ.ObjectIdentifier()),
|
|
171
|
+
namedtype.NamedType('certValue',
|
|
172
|
+
univ.Any().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0)),
|
|
173
|
+
openType=opentype.OpenType('certId', pkcs12CertBagMap)
|
|
174
|
+
)
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
x509Certificate = CertBag()
|
|
179
|
+
x509Certificate['certId'] = _OID(certTypes, 1)
|
|
180
|
+
x509Certificate['certValue'] = univ.OctetString()
|
|
181
|
+
# DER-encoded X.509 certificate stored in OCTET STRING
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
sdsiCertificate = CertBag()
|
|
185
|
+
sdsiCertificate['certId'] = _OID(certTypes, 2)
|
|
186
|
+
sdsiCertificate['certValue'] = char.IA5String()
|
|
187
|
+
# Base64-encoded SDSI certificate stored in IA5String
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
id_CRLBag = _OID(bagtypes, 4)
|
|
191
|
+
|
|
192
|
+
class CRLBag(univ.Sequence):
|
|
193
|
+
pass
|
|
194
|
+
|
|
195
|
+
CRLBag.componentType = namedtype.NamedTypes(
|
|
196
|
+
namedtype.NamedType('crlId', univ.ObjectIdentifier()),
|
|
197
|
+
namedtype.NamedType('crlValue',
|
|
198
|
+
univ.Any().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0)),
|
|
199
|
+
openType=opentype.OpenType('crlId', pkcs12CRLBagMap)
|
|
200
|
+
)
|
|
201
|
+
)
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
x509CRL = CRLBag()
|
|
205
|
+
x509CRL['crlId'] = _OID(crlTypes, 1)
|
|
206
|
+
x509CRL['crlValue'] = univ.OctetString()
|
|
207
|
+
# DER-encoded X.509 CRL stored in OCTET STRING
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
id_secretBag = _OID(bagtypes, 5)
|
|
211
|
+
|
|
212
|
+
class SecretBag(univ.Sequence):
|
|
213
|
+
pass
|
|
214
|
+
|
|
215
|
+
SecretBag.componentType = namedtype.NamedTypes(
|
|
216
|
+
namedtype.NamedType('secretTypeId', univ.ObjectIdentifier()),
|
|
217
|
+
namedtype.NamedType('secretValue',
|
|
218
|
+
univ.Any().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0)),
|
|
219
|
+
openType=opentype.OpenType('secretTypeId', pkcs12SecretBagMap)
|
|
220
|
+
)
|
|
221
|
+
)
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
id_safeContentsBag = _OID(bagtypes, 6)
|
|
225
|
+
|
|
226
|
+
class SafeBag(univ.Sequence):
|
|
227
|
+
pass
|
|
228
|
+
|
|
229
|
+
SafeBag.componentType = namedtype.NamedTypes(
|
|
230
|
+
namedtype.NamedType('bagId', univ.ObjectIdentifier()),
|
|
231
|
+
namedtype.NamedType('bagValue',
|
|
232
|
+
univ.Any().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0)),
|
|
233
|
+
openType=opentype.OpenType('bagId', pkcs12BagTypeMap)
|
|
234
|
+
),
|
|
235
|
+
namedtype.OptionalNamedType('bagAttributes',
|
|
236
|
+
univ.SetOf(componentType=PKCS12Attribute())
|
|
237
|
+
)
|
|
238
|
+
)
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
class SafeContents(univ.SequenceOf):
|
|
242
|
+
pass
|
|
243
|
+
|
|
244
|
+
SafeContents.componentType = SafeBag()
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
# The PFX PDU
|
|
248
|
+
|
|
249
|
+
class AuthenticatedSafe(univ.SequenceOf):
|
|
250
|
+
pass
|
|
251
|
+
|
|
252
|
+
AuthenticatedSafe.componentType = ContentInfo()
|
|
253
|
+
# Data if unencrypted
|
|
254
|
+
# EncryptedData if password-encrypted
|
|
255
|
+
# EnvelopedData if public key-encrypted
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
class MacData(univ.Sequence):
|
|
259
|
+
pass
|
|
260
|
+
|
|
261
|
+
MacData.componentType = namedtype.NamedTypes(
|
|
262
|
+
namedtype.NamedType('mac', DigestInfo()),
|
|
263
|
+
namedtype.NamedType('macSalt', univ.OctetString()),
|
|
264
|
+
namedtype.DefaultedNamedType('iterations', univ.Integer().subtype(value=1))
|
|
265
|
+
# Note: The default is for historical reasons and its use is deprecated
|
|
266
|
+
)
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
class PFX(univ.Sequence):
|
|
270
|
+
pass
|
|
271
|
+
|
|
272
|
+
PFX.componentType = namedtype.NamedTypes(
|
|
273
|
+
namedtype.NamedType('version',
|
|
274
|
+
univ.Integer(namedValues=namedval.NamedValues(('v3', 3)))
|
|
275
|
+
),
|
|
276
|
+
namedtype.NamedType('authSafe', ContentInfo()),
|
|
277
|
+
namedtype.OptionalNamedType('macData', MacData())
|
|
278
|
+
)
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
# Local key identifier (also defined as certificateAttribute in rfc2985.py)
|
|
282
|
+
|
|
283
|
+
pkcs_9_at_localKeyId = _OID(pkcs_9, 21)
|
|
284
|
+
|
|
285
|
+
localKeyId = CMSSingleAttribute()
|
|
286
|
+
localKeyId['attrType'] = pkcs_9_at_localKeyId
|
|
287
|
+
localKeyId['attrValues'][0] = univ.OctetString()
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
# Friendly name (also defined as certificateAttribute in rfc2985.py)
|
|
291
|
+
|
|
292
|
+
pkcs_9_ub_pkcs9String = univ.Integer(255)
|
|
293
|
+
|
|
294
|
+
pkcs_9_ub_friendlyName = univ.Integer(pkcs_9_ub_pkcs9String)
|
|
295
|
+
|
|
296
|
+
pkcs_9_at_friendlyName = _OID(pkcs_9, 20)
|
|
297
|
+
|
|
298
|
+
class FriendlyName(char.BMPString):
|
|
299
|
+
pass
|
|
300
|
+
|
|
301
|
+
FriendlyName.subtypeSpec = constraint.ValueSizeConstraint(1, pkcs_9_ub_friendlyName)
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
friendlyName = CMSSingleAttribute()
|
|
305
|
+
friendlyName['attrType'] = pkcs_9_at_friendlyName
|
|
306
|
+
friendlyName['attrValues'][0] = FriendlyName()
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
# Update the PKCS#12 maps
|
|
310
|
+
|
|
311
|
+
_pkcs12BagTypeMap = {
|
|
312
|
+
id_keyBag: KeyBag(),
|
|
313
|
+
id_pkcs8ShroudedKeyBag: PKCS8ShroudedKeyBag(),
|
|
314
|
+
id_certBag: CertBag(),
|
|
315
|
+
id_CRLBag: CRLBag(),
|
|
316
|
+
id_secretBag: SecretBag(),
|
|
317
|
+
id_safeContentsBag: SafeBag(),
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
pkcs12BagTypeMap.update(_pkcs12BagTypeMap)
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
_pkcs12CertBagMap = {
|
|
324
|
+
_OID(certTypes, 1): univ.OctetString(),
|
|
325
|
+
_OID(certTypes, 2): char.IA5String(),
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
pkcs12CertBagMap.update(_pkcs12CertBagMap)
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
_pkcs12CRLBagMap = {
|
|
332
|
+
_OID(crlTypes, 1): univ.OctetString(),
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
pkcs12CRLBagMap.update(_pkcs12CRLBagMap)
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
# Update the Algorithm Identifier map
|
|
339
|
+
|
|
340
|
+
_algorithmIdentifierMapUpdate = {
|
|
341
|
+
pbeWithSHAAnd128BitRC4: Pkcs_12PbeParams(),
|
|
342
|
+
pbeWithSHAAnd40BitRC4: Pkcs_12PbeParams(),
|
|
343
|
+
pbeWithSHAAnd3_KeyTripleDES_CBC: Pkcs_12PbeParams(),
|
|
344
|
+
pbeWithSHAAnd2_KeyTripleDES_CBC: Pkcs_12PbeParams(),
|
|
345
|
+
pbeWithSHAAnd128BitRC2_CBC: Pkcs_12PbeParams(),
|
|
346
|
+
pbeWithSHAAnd40BitRC2_CBC: Pkcs_12PbeParams(),
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
algorithmIdentifierMap.update(_algorithmIdentifierMapUpdate)
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
# Update the CMS Attribute map
|
|
353
|
+
|
|
354
|
+
_cmsAttributesMapUpdate = {
|
|
355
|
+
pkcs_9_at_friendlyName: FriendlyName(),
|
|
356
|
+
pkcs_9_at_localKeyId: univ.OctetString(),
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
cmsAttributesMap.update(_cmsAttributesMapUpdate)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# This file is part of pyasn1-alt-modules software.
|
|
2
|
+
#
|
|
3
|
+
# Created by Russ Housley.
|
|
4
|
+
#
|
|
5
|
+
# Copyright (c) 2019-2024, Vigil Security, LLC
|
|
6
|
+
# License: http://vigilsec.com/pyasn1-alt-modules-license.txt
|
|
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_alt_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()
|
|
@@ -0,0 +1,92 @@
|
|
|
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
|
+
# Securing Header Fields with S/MIME
|
|
11
|
+
#
|
|
12
|
+
# ASN.1 source from:
|
|
13
|
+
# https://www.rfc-editor.org/rfc/rfc7508.txt
|
|
14
|
+
# https://www.rfc-editor.org/errata/eid5875
|
|
15
|
+
#
|
|
16
|
+
|
|
17
|
+
import string
|
|
18
|
+
|
|
19
|
+
from pyasn1.type import char
|
|
20
|
+
from pyasn1.type import constraint
|
|
21
|
+
from pyasn1.type import namedtype
|
|
22
|
+
from pyasn1.type import namedval
|
|
23
|
+
from pyasn1.type import univ
|
|
24
|
+
|
|
25
|
+
from pyasn1_alt_modules import opentypemap
|
|
26
|
+
|
|
27
|
+
cmsAttributesMap = opentypemap.get('cmsAttributesMap')
|
|
28
|
+
|
|
29
|
+
MAX = float('inf')
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class Algorithm(univ.Enumerated):
|
|
33
|
+
namedValues = namedval.NamedValues(
|
|
34
|
+
('canonAlgorithmSimple', 0),
|
|
35
|
+
('canonAlgorithmRelaxed', 1)
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class HeaderFieldStatus(univ.Integer):
|
|
40
|
+
namedValues = namedval.NamedValues(
|
|
41
|
+
('duplicated', 0),
|
|
42
|
+
('deleted', 1),
|
|
43
|
+
('modified', 2)
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class HeaderFieldName(char.VisibleString):
|
|
48
|
+
subtypeSpec = (
|
|
49
|
+
constraint.PermittedAlphabetConstraint(*string.printable) -
|
|
50
|
+
constraint.PermittedAlphabetConstraint(':')
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class HeaderFieldValue(char.UTF8String):
|
|
55
|
+
pass
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
class HeaderField(univ.Sequence):
|
|
59
|
+
componentType = namedtype.NamedTypes(
|
|
60
|
+
namedtype.NamedType('field-Name', HeaderFieldName()),
|
|
61
|
+
namedtype.NamedType('field-Value', HeaderFieldValue()),
|
|
62
|
+
namedtype.DefaultedNamedType('field-Status',
|
|
63
|
+
HeaderFieldStatus().subtype(value='duplicated'))
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class HeaderFields(univ.SequenceOf):
|
|
68
|
+
componentType = HeaderField()
|
|
69
|
+
subtypeSpec = constraint.ValueSizeConstraint(1, MAX)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
class SecureHeaderFields(univ.Set):
|
|
73
|
+
componentType = namedtype.NamedTypes(
|
|
74
|
+
namedtype.NamedType('canonAlgorithm', Algorithm()),
|
|
75
|
+
namedtype.NamedType('secHeaderFields', HeaderFields())
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
id_aa = univ.ObjectIdentifier((1, 2, 840, 113549, 1, 9, 16, 2, ))
|
|
80
|
+
|
|
81
|
+
id_aa_secureHeaderFieldsIdentifier = id_aa + (55, )
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
# Update the CMS Attribute Attributes Map
|
|
86
|
+
|
|
87
|
+
_cmsAttributesMapUpdate = {
|
|
88
|
+
id_aa_secureHeaderFieldsIdentifier: SecureHeaderFields(),
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
cmsAttributesMap.update(_cmsAttributesMapUpdate)
|
|
92
|
+
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file is part of pyasn1-alt-modules software.
|
|
3
|
+
#
|
|
4
|
+
# Created by Russ Housley with some 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
|
+
# Network Access Identifier (NAI) Realm Name for Certificates
|
|
11
|
+
#
|
|
12
|
+
# ASN.1 source from:
|
|
13
|
+
# https://www.rfc-editor.org/rfc/rfc7585.txt
|
|
14
|
+
#
|
|
15
|
+
|
|
16
|
+
from pyasn1.type import char
|
|
17
|
+
from pyasn1.type import constraint
|
|
18
|
+
from pyasn1.type import univ
|
|
19
|
+
|
|
20
|
+
from pyasn1_alt_modules import rfc5280
|
|
21
|
+
from pyasn1_alt_modules import opentypemap
|
|
22
|
+
|
|
23
|
+
otherNamesMap = opentypemap.get('otherNamesMap')
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
# NAI Realm Name for Certificates
|
|
27
|
+
|
|
28
|
+
id_pkix = univ.ObjectIdentifier('1.3.6.1.5.5.7')
|
|
29
|
+
|
|
30
|
+
id_on = id_pkix + (8, )
|
|
31
|
+
|
|
32
|
+
id_on_naiRealm = id_on + (8, )
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
ub_naiRealm_length = univ.Integer(255)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class NAIRealm(char.UTF8String):
|
|
39
|
+
subtypeSpec = constraint.ValueSizeConstraint(1, ub_naiRealm_length)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
naiRealm = rfc5280.AnotherName()
|
|
43
|
+
naiRealm['type-id'] = id_on_naiRealm
|
|
44
|
+
naiRealm['value'] = NAIRealm()
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
# Update the Other Names Map
|
|
48
|
+
|
|
49
|
+
_otherNamesMapUpdate = {
|
|
50
|
+
id_on_naiRealm: NAIRealm(),
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
otherNamesMap.update(_otherNamesMapUpdate)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file is part of pyasn1-alt-modules software.
|
|
3
|
+
#
|
|
4
|
+
# Created by Russ Housley with some 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
|
+
# Transport Layer Security (TLS) Feature Certificate Extension
|
|
11
|
+
#
|
|
12
|
+
# ASN.1 source from:
|
|
13
|
+
# https://www.rfc-editor.org/rfc/rfc7633.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
|
+
# TLS Features Extension
|
|
24
|
+
|
|
25
|
+
id_pe = univ.ObjectIdentifier('1.3.6.1.5.5.7.1')
|
|
26
|
+
|
|
27
|
+
id_pe_tlsfeature = id_pe + (24, )
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class Features(univ.SequenceOf):
|
|
31
|
+
componentType = univ.Integer()
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
# Update the Certificate Extensions Map
|
|
35
|
+
|
|
36
|
+
_certificateExtensionsMapUpdate = {
|
|
37
|
+
id_pe_tlsfeature: Features(),
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
certificateExtensionsMap.update(_certificateExtensionsMapUpdate)
|
|
@@ -0,0 +1,66 @@
|
|
|
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 and
|
|
6
|
+
# update the S/MIME Capability Map.
|
|
7
|
+
#
|
|
8
|
+
# Copyright (c) 2019-2024, Vigil Security, LLC
|
|
9
|
+
# License: http://vigilsec.com/pyasn1-alt-modules-license.txt
|
|
10
|
+
#
|
|
11
|
+
# The BLAKE2 Cryptographic Hash and MAC
|
|
12
|
+
#
|
|
13
|
+
# ASN.1 source from:
|
|
14
|
+
# https://www.rfc-editor.org/rfc/rfc7693.txt
|
|
15
|
+
#
|
|
16
|
+
|
|
17
|
+
from pyasn1.type import univ
|
|
18
|
+
|
|
19
|
+
from pyasn1_alt_modules import opentypemap
|
|
20
|
+
|
|
21
|
+
algorithmIdentifierMap = opentypemap.get('algorithmIdentifierMap')
|
|
22
|
+
|
|
23
|
+
smimeCapabilityMap = opentypemap.get('smimeCapabilityMap')
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
# BLAKE2 Object Identifiers
|
|
27
|
+
|
|
28
|
+
hashAlgs = univ.ObjectIdentifier('1.3.6.1.4.1.1722.12.2')
|
|
29
|
+
|
|
30
|
+
blake2b = hashAlgs + (1, )
|
|
31
|
+
|
|
32
|
+
id_blake2b160 = blake2b + (5, )
|
|
33
|
+
|
|
34
|
+
id_blake2b256 = blake2b + (8, )
|
|
35
|
+
|
|
36
|
+
id_blake2b384 = blake2b + (12, )
|
|
37
|
+
|
|
38
|
+
id_blake2b512 = blake2b + (16, )
|
|
39
|
+
|
|
40
|
+
blake2s = hashAlgs + (2, )
|
|
41
|
+
|
|
42
|
+
id_blake2s128 = blake2s + (4, )
|
|
43
|
+
|
|
44
|
+
id_blake2s160 = blake2s + (5, )
|
|
45
|
+
|
|
46
|
+
id_blake2s224 = blake2s + (7, )
|
|
47
|
+
|
|
48
|
+
id_blake2s256 = blake2s + (8, )
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
# Update the Algorithm Identifier Map and the S/MIME Capability Map
|
|
52
|
+
|
|
53
|
+
_algorithmIdentifierMapUpdate = {
|
|
54
|
+
id_blake2b160: univ.Null(),
|
|
55
|
+
id_blake2b256: univ.Null(),
|
|
56
|
+
id_blake2b384: univ.Null(),
|
|
57
|
+
id_blake2b512: univ.Null(),
|
|
58
|
+
id_blake2s128: univ.Null(),
|
|
59
|
+
id_blake2s160: univ.Null(),
|
|
60
|
+
id_blake2s224: univ.Null(),
|
|
61
|
+
id_blake2s256: univ.Null(),
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
algorithmIdentifierMap.update(_algorithmIdentifierMapUpdate)
|
|
65
|
+
|
|
66
|
+
smimeCapabilityMap.update(_algorithmIdentifierMapUpdate)
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file is part of pyasn1-alt-modules software.
|
|
3
|
+
#
|
|
4
|
+
# Created by Russ Housley with some 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
|
+
# Authentication Context Certificate Extension
|
|
11
|
+
#
|
|
12
|
+
# ASN.1 source from:
|
|
13
|
+
# https://www.rfc-editor.org/rfc/rfc7773.txt
|
|
14
|
+
#
|
|
15
|
+
|
|
16
|
+
from pyasn1.type import char
|
|
17
|
+
from pyasn1.type import constraint
|
|
18
|
+
from pyasn1.type import namedtype
|
|
19
|
+
from pyasn1.type import univ
|
|
20
|
+
|
|
21
|
+
from pyasn1_alt_modules import opentypemap
|
|
22
|
+
|
|
23
|
+
certificateExtensionsMap = opentypemap.get('certificateExtensionsMap')
|
|
24
|
+
|
|
25
|
+
MAX = float('inf')
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
# Authentication Context Extension
|
|
29
|
+
|
|
30
|
+
e_legnamnden = univ.ObjectIdentifier('1.2.752.201')
|
|
31
|
+
|
|
32
|
+
id_eleg_ce = e_legnamnden + (5, )
|
|
33
|
+
|
|
34
|
+
id_ce_authContext = id_eleg_ce + (1, )
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class AuthenticationContext(univ.Sequence):
|
|
38
|
+
componentType = namedtype.NamedTypes(
|
|
39
|
+
namedtype.NamedType('contextType', char.UTF8String()),
|
|
40
|
+
namedtype.OptionalNamedType('contextInfo', char.UTF8String())
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
class AuthenticationContexts(univ.SequenceOf):
|
|
44
|
+
componentType = AuthenticationContext()
|
|
45
|
+
subtypeSpec=constraint.ValueSizeConstraint(1, MAX)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
# Update the Certificate Extensions Map
|
|
49
|
+
|
|
50
|
+
_certificateExtensionsMapUpdate = {
|
|
51
|
+
id_ce_authContext: AuthenticationContexts(),
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
certificateExtensionsMap.update(_certificateExtensionsMapUpdate)
|