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,332 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
#
|
|
3
|
+
# This file is part of pyasn1-alt-modules software.
|
|
4
|
+
#
|
|
5
|
+
# Created by Stanisław Pitucha with asn1ate tool.
|
|
6
|
+
# Copyright (c) 2005-2020, Ilya Etingof <etingof@gmail.com>
|
|
7
|
+
# Copyright (c) 2021-2024, Vigil Security, LLC
|
|
8
|
+
# License: http://vigilsec.com/pyasn1-alt-modules-license.txt
|
|
9
|
+
#
|
|
10
|
+
# An Internet Attribute Certificate Profile for Authorization
|
|
11
|
+
#
|
|
12
|
+
# ASN.1 source from:
|
|
13
|
+
# http://www.ietf.org/rfc/rfc3281.txt
|
|
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 tag
|
|
20
|
+
from pyasn1.type import univ
|
|
21
|
+
from pyasn1.type import useful
|
|
22
|
+
|
|
23
|
+
from pyasn1_alt_modules import rfc3280
|
|
24
|
+
|
|
25
|
+
MAX = float('inf')
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def _buildOid(*components):
|
|
29
|
+
output = []
|
|
30
|
+
for x in tuple(components):
|
|
31
|
+
if isinstance(x, univ.ObjectIdentifier):
|
|
32
|
+
output.extend(list(x))
|
|
33
|
+
else:
|
|
34
|
+
output.append(int(x))
|
|
35
|
+
|
|
36
|
+
return univ.ObjectIdentifier(output)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class ObjectDigestInfo(univ.Sequence):
|
|
40
|
+
pass
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
ObjectDigestInfo.componentType = namedtype.NamedTypes(
|
|
44
|
+
namedtype.NamedType('digestedObjectType', univ.Enumerated(
|
|
45
|
+
namedValues=namedval.NamedValues(('publicKey', 0), ('publicKeyCert', 1), ('otherObjectTypes', 2)))),
|
|
46
|
+
namedtype.OptionalNamedType('otherObjectTypeID', univ.ObjectIdentifier()),
|
|
47
|
+
namedtype.NamedType('digestAlgorithm', rfc3280.AlgorithmIdentifier()),
|
|
48
|
+
namedtype.NamedType('objectDigest', univ.BitString())
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class IssuerSerial(univ.Sequence):
|
|
53
|
+
pass
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
IssuerSerial.componentType = namedtype.NamedTypes(
|
|
57
|
+
namedtype.NamedType('issuer', rfc3280.GeneralNames()),
|
|
58
|
+
namedtype.NamedType('serial', rfc3280.CertificateSerialNumber()),
|
|
59
|
+
namedtype.OptionalNamedType('issuerUID', rfc3280.UniqueIdentifier())
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
class TargetCert(univ.Sequence):
|
|
64
|
+
pass
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
TargetCert.componentType = namedtype.NamedTypes(
|
|
68
|
+
namedtype.NamedType('targetCertificate', IssuerSerial()),
|
|
69
|
+
namedtype.OptionalNamedType('targetName', rfc3280.GeneralName()),
|
|
70
|
+
namedtype.OptionalNamedType('certDigestInfo', ObjectDigestInfo())
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
class Target(univ.Choice):
|
|
75
|
+
pass
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
Target.componentType = namedtype.NamedTypes(
|
|
79
|
+
namedtype.NamedType('targetName', rfc3280.GeneralName().subtype(
|
|
80
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
|
|
81
|
+
namedtype.NamedType('targetGroup', rfc3280.GeneralName().subtype(
|
|
82
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1))),
|
|
83
|
+
namedtype.NamedType('targetCert',
|
|
84
|
+
TargetCert().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 2)))
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
class Targets(univ.SequenceOf):
|
|
89
|
+
pass
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
Targets.componentType = Target()
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
class ProxyInfo(univ.SequenceOf):
|
|
96
|
+
pass
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
ProxyInfo.componentType = Targets()
|
|
100
|
+
|
|
101
|
+
id_at_role = _buildOid(rfc3280.id_at, 72)
|
|
102
|
+
|
|
103
|
+
id_pe_aaControls = _buildOid(rfc3280.id_pe, 6)
|
|
104
|
+
|
|
105
|
+
id_ce_targetInformation = _buildOid(rfc3280.id_ce, 55)
|
|
106
|
+
|
|
107
|
+
id_pe_ac_auditIdentity = _buildOid(rfc3280.id_pe, 4)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
class ClassList(univ.BitString):
|
|
111
|
+
pass
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
ClassList.namedValues = namedval.NamedValues(
|
|
115
|
+
('unmarked', 0),
|
|
116
|
+
('unclassified', 1),
|
|
117
|
+
('restricted', 2),
|
|
118
|
+
('confidential', 3),
|
|
119
|
+
('secret', 4),
|
|
120
|
+
('topSecret', 5)
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
class SecurityCategory(univ.Sequence):
|
|
125
|
+
pass
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
SecurityCategory.componentType = namedtype.NamedTypes(
|
|
129
|
+
namedtype.NamedType('type', univ.ObjectIdentifier().subtype(
|
|
130
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
|
|
131
|
+
namedtype.NamedType('value', univ.Any().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1)))
|
|
132
|
+
)
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
class Clearance(univ.Sequence):
|
|
136
|
+
pass
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
Clearance.componentType = namedtype.NamedTypes(
|
|
140
|
+
namedtype.NamedType('policyId', univ.ObjectIdentifier().subtype(
|
|
141
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
|
|
142
|
+
namedtype.DefaultedNamedType('classList',
|
|
143
|
+
ClassList().subtype(implicitTag=tag.Tag(tag.tagClassContext,
|
|
144
|
+
tag.tagFormatSimple, 1)).subtype(
|
|
145
|
+
value="unclassified")),
|
|
146
|
+
namedtype.OptionalNamedType('securityCategories', univ.SetOf(componentType=SecurityCategory()).subtype(
|
|
147
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 2)))
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
class AttCertVersion(univ.Integer):
|
|
152
|
+
pass
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
AttCertVersion.namedValues = namedval.NamedValues(
|
|
156
|
+
('v2', 1)
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
id_aca = _buildOid(rfc3280.id_pkix, 10)
|
|
160
|
+
|
|
161
|
+
id_at_clearance = _buildOid(2, 5, 1, 5, 55)
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
class AttrSpec(univ.SequenceOf):
|
|
165
|
+
pass
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
AttrSpec.componentType = univ.ObjectIdentifier()
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
class AAControls(univ.Sequence):
|
|
172
|
+
pass
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
AAControls.componentType = namedtype.NamedTypes(
|
|
176
|
+
namedtype.OptionalNamedType('pathLenConstraint',
|
|
177
|
+
univ.Integer().subtype(subtypeSpec=constraint.ValueRangeConstraint(0, MAX))),
|
|
178
|
+
namedtype.OptionalNamedType('permittedAttrs',
|
|
179
|
+
AttrSpec().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
|
|
180
|
+
namedtype.OptionalNamedType('excludedAttrs',
|
|
181
|
+
AttrSpec().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1))),
|
|
182
|
+
namedtype.DefaultedNamedType('permitUnSpecified', univ.Boolean().subtype(value=1))
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
class AttCertValidityPeriod(univ.Sequence):
|
|
187
|
+
pass
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
AttCertValidityPeriod.componentType = namedtype.NamedTypes(
|
|
191
|
+
namedtype.NamedType('notBeforeTime', useful.GeneralizedTime()),
|
|
192
|
+
namedtype.NamedType('notAfterTime', useful.GeneralizedTime())
|
|
193
|
+
)
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
id_aca_authenticationInfo = _buildOid(id_aca, 1)
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
class V2Form(univ.Sequence):
|
|
200
|
+
pass
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
V2Form.componentType = namedtype.NamedTypes(
|
|
204
|
+
namedtype.OptionalNamedType('issuerName', rfc3280.GeneralNames()),
|
|
205
|
+
namedtype.OptionalNamedType('baseCertificateID', IssuerSerial().subtype(
|
|
206
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0))),
|
|
207
|
+
namedtype.OptionalNamedType('objectDigestInfo', ObjectDigestInfo().subtype(
|
|
208
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 1)))
|
|
209
|
+
)
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
class AttCertIssuer(univ.Choice):
|
|
213
|
+
pass
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
AttCertIssuer.componentType = namedtype.NamedTypes(
|
|
217
|
+
namedtype.NamedType('v1Form', rfc3280.GeneralNames()),
|
|
218
|
+
namedtype.NamedType('v2Form',
|
|
219
|
+
V2Form().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0)))
|
|
220
|
+
)
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
class Holder(univ.Sequence):
|
|
224
|
+
pass
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
Holder.componentType = namedtype.NamedTypes(
|
|
228
|
+
namedtype.OptionalNamedType('baseCertificateID', IssuerSerial().subtype(
|
|
229
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0))),
|
|
230
|
+
namedtype.OptionalNamedType('entityName', rfc3280.GeneralNames().subtype(
|
|
231
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1))),
|
|
232
|
+
namedtype.OptionalNamedType('objectDigestInfo', ObjectDigestInfo().subtype(
|
|
233
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 2)))
|
|
234
|
+
)
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
class AttributeCertificateInfo(univ.Sequence):
|
|
238
|
+
pass
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
AttributeCertificateInfo.componentType = namedtype.NamedTypes(
|
|
242
|
+
namedtype.NamedType('version', AttCertVersion()),
|
|
243
|
+
namedtype.NamedType('holder', Holder()),
|
|
244
|
+
namedtype.NamedType('issuer', AttCertIssuer()),
|
|
245
|
+
namedtype.NamedType('signature', rfc3280.AlgorithmIdentifier()),
|
|
246
|
+
namedtype.NamedType('serialNumber', rfc3280.CertificateSerialNumber()),
|
|
247
|
+
namedtype.NamedType('attrCertValidityPeriod', AttCertValidityPeriod()),
|
|
248
|
+
namedtype.NamedType('attributes', univ.SequenceOf(componentType=rfc3280.Attribute())),
|
|
249
|
+
namedtype.OptionalNamedType('issuerUniqueID', rfc3280.UniqueIdentifier()),
|
|
250
|
+
namedtype.OptionalNamedType('extensions', rfc3280.Extensions())
|
|
251
|
+
)
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
class AttributeCertificate(univ.Sequence):
|
|
255
|
+
pass
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
AttributeCertificate.componentType = namedtype.NamedTypes(
|
|
259
|
+
namedtype.NamedType('acinfo', AttributeCertificateInfo()),
|
|
260
|
+
namedtype.NamedType('signatureAlgorithm', rfc3280.AlgorithmIdentifier()),
|
|
261
|
+
namedtype.NamedType('signatureValue', univ.BitString())
|
|
262
|
+
)
|
|
263
|
+
|
|
264
|
+
id_mod = _buildOid(rfc3280.id_pkix, 0)
|
|
265
|
+
|
|
266
|
+
id_mod_attribute_cert = _buildOid(id_mod, 12)
|
|
267
|
+
|
|
268
|
+
id_aca_accessIdentity = _buildOid(id_aca, 2)
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
class RoleSyntax(univ.Sequence):
|
|
272
|
+
pass
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
RoleSyntax.componentType = namedtype.NamedTypes(
|
|
276
|
+
namedtype.OptionalNamedType('roleAuthority', rfc3280.GeneralNames().subtype(
|
|
277
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
|
|
278
|
+
namedtype.NamedType('roleName',
|
|
279
|
+
rfc3280.GeneralName().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1)))
|
|
280
|
+
)
|
|
281
|
+
|
|
282
|
+
id_aca_chargingIdentity = _buildOid(id_aca, 3)
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
class ACClearAttrs(univ.Sequence):
|
|
286
|
+
pass
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
ACClearAttrs.componentType = namedtype.NamedTypes(
|
|
290
|
+
namedtype.NamedType('acIssuer', rfc3280.GeneralName()),
|
|
291
|
+
namedtype.NamedType('acSerial', univ.Integer()),
|
|
292
|
+
namedtype.NamedType('attrs', univ.SequenceOf(componentType=rfc3280.Attribute()))
|
|
293
|
+
)
|
|
294
|
+
|
|
295
|
+
id_aca_group = _buildOid(id_aca, 4)
|
|
296
|
+
|
|
297
|
+
id_pe_ac_proxying = _buildOid(rfc3280.id_pe, 10)
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
class SvceAuthInfo(univ.Sequence):
|
|
301
|
+
pass
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
SvceAuthInfo.componentType = namedtype.NamedTypes(
|
|
305
|
+
namedtype.NamedType('service', rfc3280.GeneralName()),
|
|
306
|
+
namedtype.NamedType('ident', rfc3280.GeneralName()),
|
|
307
|
+
namedtype.OptionalNamedType('authInfo', univ.OctetString())
|
|
308
|
+
)
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
class IetfAttrSyntax(univ.Sequence):
|
|
312
|
+
pass
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
IetfAttrSyntax.componentType = namedtype.NamedTypes(
|
|
316
|
+
namedtype.OptionalNamedType(
|
|
317
|
+
'policyAuthority', rfc3280.GeneralNames().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))
|
|
318
|
+
),
|
|
319
|
+
namedtype.NamedType(
|
|
320
|
+
'values', univ.SequenceOf(
|
|
321
|
+
componentType=univ.Choice(
|
|
322
|
+
componentType=namedtype.NamedTypes(
|
|
323
|
+
namedtype.NamedType('octets', univ.OctetString()),
|
|
324
|
+
namedtype.NamedType('oid', univ.ObjectIdentifier()),
|
|
325
|
+
namedtype.NamedType('string', char.UTF8String())
|
|
326
|
+
)
|
|
327
|
+
)
|
|
328
|
+
)
|
|
329
|
+
)
|
|
330
|
+
)
|
|
331
|
+
|
|
332
|
+
id_aca_encAttrs = _buildOid(id_aca, 6)
|
|
@@ -0,0 +1,142 @@
|
|
|
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
|
+
# Cryptographic Message Syntax (CMS) Algorithms
|
|
11
|
+
#
|
|
12
|
+
# ASN.1 source from:
|
|
13
|
+
# https://www.rfc-editor.org/rfc/rfc3370.txt
|
|
14
|
+
#
|
|
15
|
+
|
|
16
|
+
from pyasn1.type import univ
|
|
17
|
+
|
|
18
|
+
from pyasn1_alt_modules import rfc3279
|
|
19
|
+
from pyasn1_alt_modules import rfc5280
|
|
20
|
+
from pyasn1_alt_modules import rfc5753
|
|
21
|
+
from pyasn1_alt_modules import rfc5990
|
|
22
|
+
from pyasn1_alt_modules import rfc8018
|
|
23
|
+
from pyasn1_alt_modules import opentypemap
|
|
24
|
+
|
|
25
|
+
algorithmIdentifierMap = opentypemap.get('algorithmIdentifierMap')
|
|
26
|
+
|
|
27
|
+
smimeCapabilityMap = opentypemap.get('smimeCapabilityMap')
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# Imports from RFC 5280
|
|
31
|
+
|
|
32
|
+
AlgorithmIdentifier = rfc5280.AlgorithmIdentifier
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
# Imports from RFC 3279
|
|
36
|
+
|
|
37
|
+
dhpublicnumber = rfc3279.dhpublicnumber
|
|
38
|
+
|
|
39
|
+
dh_public_number = dhpublicnumber
|
|
40
|
+
|
|
41
|
+
DHPublicKey = rfc3279.DHPublicKey
|
|
42
|
+
|
|
43
|
+
DomainParameters = rfc3279.DomainParameters
|
|
44
|
+
|
|
45
|
+
DHDomainParameters = DomainParameters
|
|
46
|
+
|
|
47
|
+
Dss_Parms = rfc3279.Dss_Parms
|
|
48
|
+
|
|
49
|
+
Dss_Sig_Value = rfc3279.Dss_Sig_Value
|
|
50
|
+
|
|
51
|
+
md5 = rfc3279.md5
|
|
52
|
+
|
|
53
|
+
md5WithRSAEncryption = rfc3279.md5WithRSAEncryption
|
|
54
|
+
|
|
55
|
+
RSAPublicKey = rfc3279.RSAPublicKey
|
|
56
|
+
|
|
57
|
+
rsaEncryption = rfc3279.rsaEncryption
|
|
58
|
+
|
|
59
|
+
ValidationParms = rfc3279.ValidationParms
|
|
60
|
+
|
|
61
|
+
id_dsa = rfc3279.id_dsa
|
|
62
|
+
|
|
63
|
+
id_dsa_with_sha1 = rfc3279.id_dsa_with_sha1
|
|
64
|
+
|
|
65
|
+
id_sha1 = rfc3279.id_sha1
|
|
66
|
+
|
|
67
|
+
sha_1 = id_sha1
|
|
68
|
+
|
|
69
|
+
sha1WithRSAEncryption = rfc3279.sha1WithRSAEncryption
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
# Imports from RFC 5753
|
|
73
|
+
|
|
74
|
+
CBCParameter = rfc5753.CBCParameter
|
|
75
|
+
|
|
76
|
+
CBCParameter = rfc5753.IV
|
|
77
|
+
|
|
78
|
+
KeyWrapAlgorithm = rfc5753.KeyWrapAlgorithm
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
# Imports from RFC 5990
|
|
82
|
+
|
|
83
|
+
id_alg_CMS3DESwrap = rfc5990.id_alg_CMS3DESwrap
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
# Imports from RFC 8018
|
|
87
|
+
|
|
88
|
+
des_EDE3_CBC = rfc8018.des_EDE3_CBC
|
|
89
|
+
|
|
90
|
+
des_ede3_cbc = des_EDE3_CBC
|
|
91
|
+
|
|
92
|
+
rc2CBC = rfc8018.rc2CBC
|
|
93
|
+
|
|
94
|
+
rc2_cbc = rc2CBC
|
|
95
|
+
|
|
96
|
+
RC2_CBC_Parameter = rfc8018.RC2_CBC_Parameter
|
|
97
|
+
|
|
98
|
+
RC2CBCParameter = RC2_CBC_Parameter
|
|
99
|
+
|
|
100
|
+
PBKDF2_params = rfc8018.PBKDF2_params
|
|
101
|
+
|
|
102
|
+
id_PBKDF2 = rfc8018.id_PBKDF2
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
# The few things that are not already defined elsewhere
|
|
106
|
+
|
|
107
|
+
hMAC_SHA1 = univ.ObjectIdentifier('1.3.6.1.5.5.8.1.2')
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
id_alg_ESDH = univ.ObjectIdentifier('1.2.840.113549.1.9.16.3.5')
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
id_alg_SSDH = univ.ObjectIdentifier('1.2.840.113549.1.9.16.3.10')
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
id_alg_CMSRC2wrap = univ.ObjectIdentifier('1.2.840.113549.1.9.16.3.7')
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
class RC2ParameterVersion(univ.Integer):
|
|
120
|
+
pass
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
class RC2wrapParameter(RC2ParameterVersion):
|
|
124
|
+
pass
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
class Dss_Pub_Key(univ.Integer):
|
|
128
|
+
pass
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
# Update the Algorithm Identifiers Map and S/MIME Capability Map
|
|
132
|
+
|
|
133
|
+
_algorithmIdentifierMapUpdate = {
|
|
134
|
+
hMAC_SHA1: univ.Null(""),
|
|
135
|
+
id_alg_CMSRC2wrap: RC2wrapParameter(),
|
|
136
|
+
id_alg_ESDH: KeyWrapAlgorithm(),
|
|
137
|
+
id_alg_SSDH: KeyWrapAlgorithm(),
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
algorithmIdentifierMap.update(_algorithmIdentifierMapUpdate)
|
|
141
|
+
|
|
142
|
+
smimeCapabilityMap.update(_algorithmIdentifierMapUpdate)
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file is part of pyasn1-alt-modules software.
|
|
3
|
+
#
|
|
4
|
+
# Copyright (c) 2005-2020, Ilya Etingof <etingof@gmail.com>
|
|
5
|
+
# Copyright (c) 2021-2024, Vigil Security, LLC
|
|
6
|
+
# License: http://vigilsec.com/pyasn1-alt-modules-license.txt
|
|
7
|
+
#
|
|
8
|
+
# SNMPv3 message syntax
|
|
9
|
+
#
|
|
10
|
+
# ASN.1 source from:
|
|
11
|
+
# http://www.ietf.org/rfc/rfc3412.txt
|
|
12
|
+
#
|
|
13
|
+
from pyasn1.type import constraint
|
|
14
|
+
from pyasn1.type import namedtype
|
|
15
|
+
from pyasn1.type import univ
|
|
16
|
+
|
|
17
|
+
from pyasn1_alt_modules import rfc1905
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class ScopedPDU(univ.Sequence):
|
|
21
|
+
componentType = namedtype.NamedTypes(
|
|
22
|
+
namedtype.NamedType('contextEngineId', univ.OctetString()),
|
|
23
|
+
namedtype.NamedType('contextName', univ.OctetString()),
|
|
24
|
+
namedtype.NamedType('data', rfc1905.PDUs())
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class ScopedPduData(univ.Choice):
|
|
29
|
+
componentType = namedtype.NamedTypes(
|
|
30
|
+
namedtype.NamedType('plaintext', ScopedPDU()),
|
|
31
|
+
namedtype.NamedType('encryptedPDU', univ.OctetString()),
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class HeaderData(univ.Sequence):
|
|
36
|
+
componentType = namedtype.NamedTypes(
|
|
37
|
+
namedtype.NamedType('msgID',
|
|
38
|
+
univ.Integer().subtype(subtypeSpec=constraint.ValueRangeConstraint(0, 2147483647))),
|
|
39
|
+
namedtype.NamedType('msgMaxSize',
|
|
40
|
+
univ.Integer().subtype(subtypeSpec=constraint.ValueRangeConstraint(484, 2147483647))),
|
|
41
|
+
namedtype.NamedType('msgFlags', univ.OctetString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, 1))),
|
|
42
|
+
namedtype.NamedType('msgSecurityModel',
|
|
43
|
+
univ.Integer().subtype(subtypeSpec=constraint.ValueRangeConstraint(1, 2147483647)))
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class SNMPv3Message(univ.Sequence):
|
|
48
|
+
componentType = namedtype.NamedTypes(
|
|
49
|
+
namedtype.NamedType('msgVersion',
|
|
50
|
+
univ.Integer().subtype(subtypeSpec=constraint.ValueRangeConstraint(0, 2147483647))),
|
|
51
|
+
namedtype.NamedType('msgGlobalData', HeaderData()),
|
|
52
|
+
namedtype.NamedType('msgSecurityParameters', univ.OctetString()),
|
|
53
|
+
namedtype.NamedType('msgData', ScopedPduData())
|
|
54
|
+
)
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file is part of pyasn1-alt-modules software.
|
|
3
|
+
#
|
|
4
|
+
# Copyright (c) 2005-2020, Ilya Etingof <etingof@gmail.com>
|
|
5
|
+
# Copyright (c) 2021-2024, Vigil Security, LLC
|
|
6
|
+
# License: http://vigilsec.com/pyasn1-alt-modules-license.txt
|
|
7
|
+
#
|
|
8
|
+
# SNMPv3 message syntax
|
|
9
|
+
#
|
|
10
|
+
# ASN.1 source from:
|
|
11
|
+
# http://www.ietf.org/rfc/rfc3414.txt
|
|
12
|
+
#
|
|
13
|
+
from pyasn1.type import constraint
|
|
14
|
+
from pyasn1.type import namedtype
|
|
15
|
+
from pyasn1.type import univ
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class UsmSecurityParameters(univ.Sequence):
|
|
19
|
+
componentType = namedtype.NamedTypes(
|
|
20
|
+
namedtype.NamedType('msgAuthoritativeEngineID', univ.OctetString()),
|
|
21
|
+
namedtype.NamedType('msgAuthoritativeEngineBoots',
|
|
22
|
+
univ.Integer().subtype(subtypeSpec=constraint.ValueRangeConstraint(0, 2147483647))),
|
|
23
|
+
namedtype.NamedType('msgAuthoritativeEngineTime',
|
|
24
|
+
univ.Integer().subtype(subtypeSpec=constraint.ValueRangeConstraint(0, 2147483647))),
|
|
25
|
+
namedtype.NamedType('msgUserName',
|
|
26
|
+
univ.OctetString().subtype(subtypeSpec=constraint.ValueSizeConstraint(0, 32))),
|
|
27
|
+
namedtype.NamedType('msgAuthenticationParameters', univ.OctetString()),
|
|
28
|
+
namedtype.NamedType('msgPrivacyParameters', univ.OctetString())
|
|
29
|
+
)
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file is part of pyasn1-alt-modules software.
|
|
3
|
+
#
|
|
4
|
+
# Copyright (c) 2005-2020, Ilya Etingof <etingof@gmail.com>
|
|
5
|
+
# Copyright (c) 2021-2024, Vigil Security, LLC
|
|
6
|
+
# License: http://vigilsec.com/pyasn1-alt-modules-license.txt
|
|
7
|
+
#
|
|
8
|
+
# PKCS#1 syntax
|
|
9
|
+
#
|
|
10
|
+
# ASN.1 source from:
|
|
11
|
+
# ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1.asn
|
|
12
|
+
#
|
|
13
|
+
# Sample captures could be obtained with "openssl genrsa" command
|
|
14
|
+
#
|
|
15
|
+
from pyasn1.type import constraint
|
|
16
|
+
from pyasn1.type import namedval
|
|
17
|
+
|
|
18
|
+
from pyasn1_alt_modules.rfc2437 import *
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class OtherPrimeInfo(univ.Sequence):
|
|
22
|
+
componentType = namedtype.NamedTypes(
|
|
23
|
+
namedtype.NamedType('prime', univ.Integer()),
|
|
24
|
+
namedtype.NamedType('exponent', univ.Integer()),
|
|
25
|
+
namedtype.NamedType('coefficient', univ.Integer())
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class OtherPrimeInfos(univ.SequenceOf):
|
|
30
|
+
componentType = OtherPrimeInfo()
|
|
31
|
+
sizeSpec = univ.SequenceOf.sizeSpec + constraint.ValueSizeConstraint(1, MAX)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class RSAPrivateKey(univ.Sequence):
|
|
35
|
+
componentType = namedtype.NamedTypes(
|
|
36
|
+
namedtype.NamedType('version', univ.Integer(namedValues=namedval.NamedValues(('two-prime', 0), ('multi', 1)))),
|
|
37
|
+
namedtype.NamedType('modulus', univ.Integer()),
|
|
38
|
+
namedtype.NamedType('publicExponent', univ.Integer()),
|
|
39
|
+
namedtype.NamedType('privateExponent', univ.Integer()),
|
|
40
|
+
namedtype.NamedType('prime1', univ.Integer()),
|
|
41
|
+
namedtype.NamedType('prime2', univ.Integer()),
|
|
42
|
+
namedtype.NamedType('exponent1', univ.Integer()),
|
|
43
|
+
namedtype.NamedType('exponent2', univ.Integer()),
|
|
44
|
+
namedtype.NamedType('coefficient', univ.Integer()),
|
|
45
|
+
namedtype.OptionalNamedType('otherPrimeInfos', OtherPrimeInfos())
|
|
46
|
+
)
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
# Wrapping a Hashed Message Authentication Code (HMAC) key
|
|
12
|
+
# with a Triple-Data Encryption Standard (DES) Key or
|
|
13
|
+
# an Advanced Encryption Standard (AES) Key
|
|
14
|
+
#
|
|
15
|
+
# ASN.1 source from:
|
|
16
|
+
# https://www.rfc-editor.org/rfc/rfc3537.txt
|
|
17
|
+
#
|
|
18
|
+
|
|
19
|
+
from pyasn1.type import univ
|
|
20
|
+
|
|
21
|
+
from pyasn1_alt_modules import opentypemap
|
|
22
|
+
|
|
23
|
+
algorithmIdentifierMap = opentypemap.get('algorithmIdentifierMap')
|
|
24
|
+
|
|
25
|
+
smimeCapabilityMap = opentypemap.get('smimeCapabilityMap')
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
# Object Identifiers
|
|
29
|
+
|
|
30
|
+
id_alg_HMACwith3DESwrap = univ.ObjectIdentifier('1.2.840.113549.1.9.16.3.11')
|
|
31
|
+
|
|
32
|
+
id_alg_HMACwithAESwrap = univ.ObjectIdentifier('1.2.840.113549.1.9.16.3.12')
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
# Update the Algorithm Identifiers Map and S/MIME Capability Map
|
|
36
|
+
|
|
37
|
+
_algorithmIdentifierMapUpdate = {
|
|
38
|
+
id_alg_HMACwith3DESwrap: univ.Null(""),
|
|
39
|
+
id_alg_HMACwithAESwrap: univ.Null(""),
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
algorithmIdentifierMap.update(_algorithmIdentifierMapUpdate)
|
|
43
|
+
|
|
44
|
+
smimeCapabilityMap.update(_algorithmIdentifierMapUpdate)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file is part of pyasn1-alt-modules software.
|
|
3
|
+
#
|
|
4
|
+
# Created by Russ Housley.
|
|
5
|
+
#
|
|
6
|
+
# Copyright (c) 2023-2024, Vigil Security, LLC
|
|
7
|
+
# License: http://vigilsec.com/pyasn1-alt-modules-license.txt
|
|
8
|
+
#
|
|
9
|
+
# PkiPath as used in TLS Extensions
|
|
10
|
+
#
|
|
11
|
+
# ASN.1 source from:
|
|
12
|
+
# https://www.rfc-editor.org/rfc/rfc3546.txt
|
|
13
|
+
#
|
|
14
|
+
|
|
15
|
+
from pyasn1.type import univ
|
|
16
|
+
|
|
17
|
+
from pyasn1_alt_modules import rfc5280
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
# PkiPath ::= SEQUENCE OF Certificate
|
|
21
|
+
|
|
22
|
+
class PkiPath(univ.SequenceOf):
|
|
23
|
+
componentType = rfc5280.Certificate()
|