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,707 @@
|
|
|
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
|
+
# Cryptographic Message Syntax (CMS)
|
|
11
|
+
#
|
|
12
|
+
# ASN.1 source from:
|
|
13
|
+
# http://www.ietf.org/rfc/rfc3852.txt
|
|
14
|
+
#
|
|
15
|
+
from pyasn1.type import constraint
|
|
16
|
+
from pyasn1.type import namedtype
|
|
17
|
+
from pyasn1.type import namedval
|
|
18
|
+
from pyasn1.type import tag
|
|
19
|
+
from pyasn1.type import univ
|
|
20
|
+
from pyasn1.type import useful
|
|
21
|
+
|
|
22
|
+
from pyasn1_alt_modules import rfc3280
|
|
23
|
+
from pyasn1_alt_modules import rfc3281
|
|
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 AttributeValue(univ.Any):
|
|
40
|
+
pass
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class Attribute(univ.Sequence):
|
|
44
|
+
pass
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
Attribute.componentType = namedtype.NamedTypes(
|
|
48
|
+
namedtype.NamedType('attrType', univ.ObjectIdentifier()),
|
|
49
|
+
namedtype.NamedType('attrValues', univ.SetOf(componentType=AttributeValue()))
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
class SignedAttributes(univ.SetOf):
|
|
54
|
+
pass
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
SignedAttributes.componentType = Attribute()
|
|
58
|
+
SignedAttributes.sizeSpec = constraint.ValueSizeConstraint(1, MAX)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
class OtherRevocationInfoFormat(univ.Sequence):
|
|
62
|
+
pass
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
OtherRevocationInfoFormat.componentType = namedtype.NamedTypes(
|
|
66
|
+
namedtype.NamedType('otherRevInfoFormat', univ.ObjectIdentifier()),
|
|
67
|
+
namedtype.NamedType('otherRevInfo', univ.Any())
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
class RevocationInfoChoice(univ.Choice):
|
|
72
|
+
pass
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
RevocationInfoChoice.componentType = namedtype.NamedTypes(
|
|
76
|
+
namedtype.NamedType('crl', rfc3280.CertificateList()),
|
|
77
|
+
namedtype.NamedType('other', OtherRevocationInfoFormat().subtype(
|
|
78
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 1)))
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
class RevocationInfoChoices(univ.SetOf):
|
|
83
|
+
pass
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
RevocationInfoChoices.componentType = RevocationInfoChoice()
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
class OtherKeyAttribute(univ.Sequence):
|
|
90
|
+
pass
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
OtherKeyAttribute.componentType = namedtype.NamedTypes(
|
|
94
|
+
namedtype.NamedType('keyAttrId', univ.ObjectIdentifier()),
|
|
95
|
+
namedtype.OptionalNamedType('keyAttr', univ.Any())
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
id_signedData = _buildOid(1, 2, 840, 113549, 1, 7, 2)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
class KeyEncryptionAlgorithmIdentifier(rfc3280.AlgorithmIdentifier):
|
|
102
|
+
pass
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
class EncryptedKey(univ.OctetString):
|
|
106
|
+
pass
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
class CMSVersion(univ.Integer):
|
|
110
|
+
pass
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
CMSVersion.namedValues = namedval.NamedValues(
|
|
114
|
+
('v0', 0),
|
|
115
|
+
('v1', 1),
|
|
116
|
+
('v2', 2),
|
|
117
|
+
('v3', 3),
|
|
118
|
+
('v4', 4),
|
|
119
|
+
('v5', 5)
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
class KEKIdentifier(univ.Sequence):
|
|
124
|
+
pass
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
KEKIdentifier.componentType = namedtype.NamedTypes(
|
|
128
|
+
namedtype.NamedType('keyIdentifier', univ.OctetString()),
|
|
129
|
+
namedtype.OptionalNamedType('date', useful.GeneralizedTime()),
|
|
130
|
+
namedtype.OptionalNamedType('other', OtherKeyAttribute())
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
class KEKRecipientInfo(univ.Sequence):
|
|
135
|
+
pass
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
KEKRecipientInfo.componentType = namedtype.NamedTypes(
|
|
139
|
+
namedtype.NamedType('version', CMSVersion()),
|
|
140
|
+
namedtype.NamedType('kekid', KEKIdentifier()),
|
|
141
|
+
namedtype.NamedType('keyEncryptionAlgorithm', KeyEncryptionAlgorithmIdentifier()),
|
|
142
|
+
namedtype.NamedType('encryptedKey', EncryptedKey())
|
|
143
|
+
)
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
class KeyDerivationAlgorithmIdentifier(rfc3280.AlgorithmIdentifier):
|
|
147
|
+
pass
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
class PasswordRecipientInfo(univ.Sequence):
|
|
151
|
+
pass
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
PasswordRecipientInfo.componentType = namedtype.NamedTypes(
|
|
155
|
+
namedtype.NamedType('version', CMSVersion()),
|
|
156
|
+
namedtype.OptionalNamedType('keyDerivationAlgorithm', KeyDerivationAlgorithmIdentifier().subtype(
|
|
157
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
|
|
158
|
+
namedtype.NamedType('keyEncryptionAlgorithm', KeyEncryptionAlgorithmIdentifier()),
|
|
159
|
+
namedtype.NamedType('encryptedKey', EncryptedKey())
|
|
160
|
+
)
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
class OtherRecipientInfo(univ.Sequence):
|
|
164
|
+
pass
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
OtherRecipientInfo.componentType = namedtype.NamedTypes(
|
|
168
|
+
namedtype.NamedType('oriType', univ.ObjectIdentifier()),
|
|
169
|
+
namedtype.NamedType('oriValue', univ.Any())
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
class IssuerAndSerialNumber(univ.Sequence):
|
|
174
|
+
pass
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
IssuerAndSerialNumber.componentType = namedtype.NamedTypes(
|
|
178
|
+
namedtype.NamedType('issuer', rfc3280.Name()),
|
|
179
|
+
namedtype.NamedType('serialNumber', rfc3280.CertificateSerialNumber())
|
|
180
|
+
)
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
class SubjectKeyIdentifier(univ.OctetString):
|
|
184
|
+
pass
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
class RecipientKeyIdentifier(univ.Sequence):
|
|
188
|
+
pass
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
RecipientKeyIdentifier.componentType = namedtype.NamedTypes(
|
|
192
|
+
namedtype.NamedType('subjectKeyIdentifier', SubjectKeyIdentifier()),
|
|
193
|
+
namedtype.OptionalNamedType('date', useful.GeneralizedTime()),
|
|
194
|
+
namedtype.OptionalNamedType('other', OtherKeyAttribute())
|
|
195
|
+
)
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
class KeyAgreeRecipientIdentifier(univ.Choice):
|
|
199
|
+
pass
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
KeyAgreeRecipientIdentifier.componentType = namedtype.NamedTypes(
|
|
203
|
+
namedtype.NamedType('issuerAndSerialNumber', IssuerAndSerialNumber()),
|
|
204
|
+
namedtype.NamedType('rKeyId', RecipientKeyIdentifier().subtype(
|
|
205
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0)))
|
|
206
|
+
)
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
class RecipientEncryptedKey(univ.Sequence):
|
|
210
|
+
pass
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
RecipientEncryptedKey.componentType = namedtype.NamedTypes(
|
|
214
|
+
namedtype.NamedType('rid', KeyAgreeRecipientIdentifier()),
|
|
215
|
+
namedtype.NamedType('encryptedKey', EncryptedKey())
|
|
216
|
+
)
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
class RecipientEncryptedKeys(univ.SequenceOf):
|
|
220
|
+
pass
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
RecipientEncryptedKeys.componentType = RecipientEncryptedKey()
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
class UserKeyingMaterial(univ.OctetString):
|
|
227
|
+
pass
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
class OriginatorPublicKey(univ.Sequence):
|
|
231
|
+
pass
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
OriginatorPublicKey.componentType = namedtype.NamedTypes(
|
|
235
|
+
namedtype.NamedType('algorithm', rfc3280.AlgorithmIdentifier()),
|
|
236
|
+
namedtype.NamedType('publicKey', univ.BitString())
|
|
237
|
+
)
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
class OriginatorIdentifierOrKey(univ.Choice):
|
|
241
|
+
pass
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
OriginatorIdentifierOrKey.componentType = namedtype.NamedTypes(
|
|
245
|
+
namedtype.NamedType('issuerAndSerialNumber', IssuerAndSerialNumber()),
|
|
246
|
+
namedtype.NamedType('subjectKeyIdentifier', SubjectKeyIdentifier().subtype(
|
|
247
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
|
|
248
|
+
namedtype.NamedType('originatorKey', OriginatorPublicKey().subtype(
|
|
249
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 1)))
|
|
250
|
+
)
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
class KeyAgreeRecipientInfo(univ.Sequence):
|
|
254
|
+
pass
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
KeyAgreeRecipientInfo.componentType = namedtype.NamedTypes(
|
|
258
|
+
namedtype.NamedType('version', CMSVersion()),
|
|
259
|
+
namedtype.NamedType('originator', OriginatorIdentifierOrKey().subtype(
|
|
260
|
+
explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0))),
|
|
261
|
+
namedtype.OptionalNamedType('ukm', UserKeyingMaterial().subtype(
|
|
262
|
+
explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1))),
|
|
263
|
+
namedtype.NamedType('keyEncryptionAlgorithm', KeyEncryptionAlgorithmIdentifier()),
|
|
264
|
+
namedtype.NamedType('recipientEncryptedKeys', RecipientEncryptedKeys())
|
|
265
|
+
)
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
class RecipientIdentifier(univ.Choice):
|
|
269
|
+
pass
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
RecipientIdentifier.componentType = namedtype.NamedTypes(
|
|
273
|
+
namedtype.NamedType('issuerAndSerialNumber', IssuerAndSerialNumber()),
|
|
274
|
+
namedtype.NamedType('subjectKeyIdentifier', SubjectKeyIdentifier().subtype(
|
|
275
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0)))
|
|
276
|
+
)
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
class KeyTransRecipientInfo(univ.Sequence):
|
|
280
|
+
pass
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
KeyTransRecipientInfo.componentType = namedtype.NamedTypes(
|
|
284
|
+
namedtype.NamedType('version', CMSVersion()),
|
|
285
|
+
namedtype.NamedType('rid', RecipientIdentifier()),
|
|
286
|
+
namedtype.NamedType('keyEncryptionAlgorithm', KeyEncryptionAlgorithmIdentifier()),
|
|
287
|
+
namedtype.NamedType('encryptedKey', EncryptedKey())
|
|
288
|
+
)
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
class RecipientInfo(univ.Choice):
|
|
292
|
+
pass
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
RecipientInfo.componentType = namedtype.NamedTypes(
|
|
296
|
+
namedtype.NamedType('ktri', KeyTransRecipientInfo()),
|
|
297
|
+
namedtype.NamedType('kari', KeyAgreeRecipientInfo().subtype(
|
|
298
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 1))),
|
|
299
|
+
namedtype.NamedType('kekri', KEKRecipientInfo().subtype(
|
|
300
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 2))),
|
|
301
|
+
namedtype.NamedType('pwri', PasswordRecipientInfo().subtype(
|
|
302
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 3))),
|
|
303
|
+
namedtype.NamedType('ori', OtherRecipientInfo().subtype(
|
|
304
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 4)))
|
|
305
|
+
)
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
class RecipientInfos(univ.SetOf):
|
|
309
|
+
pass
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
RecipientInfos.componentType = RecipientInfo()
|
|
313
|
+
RecipientInfos.sizeSpec = constraint.ValueSizeConstraint(1, MAX)
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
class DigestAlgorithmIdentifier(rfc3280.AlgorithmIdentifier):
|
|
317
|
+
pass
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
class Signature(univ.BitString):
|
|
321
|
+
pass
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
class SignerIdentifier(univ.Choice):
|
|
325
|
+
pass
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
SignerIdentifier.componentType = namedtype.NamedTypes(
|
|
329
|
+
namedtype.NamedType('issuerAndSerialNumber', IssuerAndSerialNumber()),
|
|
330
|
+
namedtype.NamedType('subjectKeyIdentifier', SubjectKeyIdentifier().subtype(
|
|
331
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0)))
|
|
332
|
+
)
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
class UnprotectedAttributes(univ.SetOf):
|
|
336
|
+
pass
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
UnprotectedAttributes.componentType = Attribute()
|
|
340
|
+
UnprotectedAttributes.sizeSpec = constraint.ValueSizeConstraint(1, MAX)
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
class ContentType(univ.ObjectIdentifier):
|
|
344
|
+
pass
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
class EncryptedContent(univ.OctetString):
|
|
348
|
+
pass
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
class ContentEncryptionAlgorithmIdentifier(rfc3280.AlgorithmIdentifier):
|
|
352
|
+
pass
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
class EncryptedContentInfo(univ.Sequence):
|
|
356
|
+
pass
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
EncryptedContentInfo.componentType = namedtype.NamedTypes(
|
|
360
|
+
namedtype.NamedType('contentType', ContentType()),
|
|
361
|
+
namedtype.NamedType('contentEncryptionAlgorithm', ContentEncryptionAlgorithmIdentifier()),
|
|
362
|
+
namedtype.OptionalNamedType('encryptedContent', EncryptedContent().subtype(
|
|
363
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0)))
|
|
364
|
+
)
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
class EncryptedData(univ.Sequence):
|
|
368
|
+
pass
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
EncryptedData.componentType = namedtype.NamedTypes(
|
|
372
|
+
namedtype.NamedType('version', CMSVersion()),
|
|
373
|
+
namedtype.NamedType('encryptedContentInfo', EncryptedContentInfo()),
|
|
374
|
+
namedtype.OptionalNamedType('unprotectedAttrs', UnprotectedAttributes().subtype(
|
|
375
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1)))
|
|
376
|
+
)
|
|
377
|
+
|
|
378
|
+
id_contentType = _buildOid(1, 2, 840, 113549, 1, 9, 3)
|
|
379
|
+
|
|
380
|
+
id_data = _buildOid(1, 2, 840, 113549, 1, 7, 1)
|
|
381
|
+
|
|
382
|
+
id_messageDigest = _buildOid(1, 2, 840, 113549, 1, 9, 4)
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
class DigestAlgorithmIdentifiers(univ.SetOf):
|
|
386
|
+
pass
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
DigestAlgorithmIdentifiers.componentType = DigestAlgorithmIdentifier()
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
class EncapsulatedContentInfo(univ.Sequence):
|
|
393
|
+
pass
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
EncapsulatedContentInfo.componentType = namedtype.NamedTypes(
|
|
397
|
+
namedtype.NamedType('eContentType', ContentType()),
|
|
398
|
+
namedtype.OptionalNamedType('eContent', univ.OctetString().subtype(
|
|
399
|
+
explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0)))
|
|
400
|
+
)
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
class Digest(univ.OctetString):
|
|
404
|
+
pass
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
class DigestedData(univ.Sequence):
|
|
408
|
+
pass
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
DigestedData.componentType = namedtype.NamedTypes(
|
|
412
|
+
namedtype.NamedType('version', CMSVersion()),
|
|
413
|
+
namedtype.NamedType('digestAlgorithm', DigestAlgorithmIdentifier()),
|
|
414
|
+
namedtype.NamedType('encapContentInfo', EncapsulatedContentInfo()),
|
|
415
|
+
namedtype.NamedType('digest', Digest())
|
|
416
|
+
)
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
class ContentInfo(univ.Sequence):
|
|
420
|
+
pass
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
ContentInfo.componentType = namedtype.NamedTypes(
|
|
424
|
+
namedtype.NamedType('contentType', ContentType()),
|
|
425
|
+
namedtype.NamedType('content', univ.Any().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0)))
|
|
426
|
+
)
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
class UnauthAttributes(univ.SetOf):
|
|
430
|
+
pass
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
UnauthAttributes.componentType = Attribute()
|
|
434
|
+
UnauthAttributes.sizeSpec = constraint.ValueSizeConstraint(1, MAX)
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
class ExtendedCertificateInfo(univ.Sequence):
|
|
438
|
+
pass
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
ExtendedCertificateInfo.componentType = namedtype.NamedTypes(
|
|
442
|
+
namedtype.NamedType('version', CMSVersion()),
|
|
443
|
+
namedtype.NamedType('certificate', rfc3280.Certificate()),
|
|
444
|
+
namedtype.NamedType('attributes', UnauthAttributes())
|
|
445
|
+
)
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
class SignatureAlgorithmIdentifier(rfc3280.AlgorithmIdentifier):
|
|
449
|
+
pass
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
class ExtendedCertificate(univ.Sequence):
|
|
453
|
+
pass
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
ExtendedCertificate.componentType = namedtype.NamedTypes(
|
|
457
|
+
namedtype.NamedType('extendedCertificateInfo', ExtendedCertificateInfo()),
|
|
458
|
+
namedtype.NamedType('signatureAlgorithm', SignatureAlgorithmIdentifier()),
|
|
459
|
+
namedtype.NamedType('signature', Signature())
|
|
460
|
+
)
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
class OtherCertificateFormat(univ.Sequence):
|
|
464
|
+
pass
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
OtherCertificateFormat.componentType = namedtype.NamedTypes(
|
|
468
|
+
namedtype.NamedType('otherCertFormat', univ.ObjectIdentifier()),
|
|
469
|
+
namedtype.NamedType('otherCert', univ.Any())
|
|
470
|
+
)
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
class AttributeCertificateV2(rfc3281.AttributeCertificate):
|
|
474
|
+
pass
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
class AttCertVersionV1(univ.Integer):
|
|
478
|
+
pass
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
AttCertVersionV1.namedValues = namedval.NamedValues(
|
|
482
|
+
('v1', 0)
|
|
483
|
+
)
|
|
484
|
+
|
|
485
|
+
|
|
486
|
+
class AttributeCertificateInfoV1(univ.Sequence):
|
|
487
|
+
pass
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
AttributeCertificateInfoV1.componentType = namedtype.NamedTypes(
|
|
491
|
+
namedtype.DefaultedNamedType('version', AttCertVersionV1().subtype(value="v1")),
|
|
492
|
+
namedtype.NamedType(
|
|
493
|
+
'subject', univ.Choice(
|
|
494
|
+
componentType=namedtype.NamedTypes(
|
|
495
|
+
namedtype.NamedType('baseCertificateID', rfc3281.IssuerSerial().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
|
|
496
|
+
namedtype.NamedType('subjectName', rfc3280.GeneralNames().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1)))
|
|
497
|
+
)
|
|
498
|
+
)
|
|
499
|
+
),
|
|
500
|
+
namedtype.NamedType('issuer', rfc3280.GeneralNames()),
|
|
501
|
+
namedtype.NamedType('signature', rfc3280.AlgorithmIdentifier()),
|
|
502
|
+
namedtype.NamedType('serialNumber', rfc3280.CertificateSerialNumber()),
|
|
503
|
+
namedtype.NamedType('attCertValidityPeriod', rfc3281.AttCertValidityPeriod()),
|
|
504
|
+
namedtype.NamedType('attributes', univ.SequenceOf(componentType=rfc3280.Attribute())),
|
|
505
|
+
namedtype.OptionalNamedType('issuerUniqueID', rfc3280.UniqueIdentifier()),
|
|
506
|
+
namedtype.OptionalNamedType('extensions', rfc3280.Extensions())
|
|
507
|
+
)
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
class AttributeCertificateV1(univ.Sequence):
|
|
511
|
+
pass
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
AttributeCertificateV1.componentType = namedtype.NamedTypes(
|
|
515
|
+
namedtype.NamedType('acInfo', AttributeCertificateInfoV1()),
|
|
516
|
+
namedtype.NamedType('signatureAlgorithm', rfc3280.AlgorithmIdentifier()),
|
|
517
|
+
namedtype.NamedType('signature', univ.BitString())
|
|
518
|
+
)
|
|
519
|
+
|
|
520
|
+
|
|
521
|
+
class CertificateChoices(univ.Choice):
|
|
522
|
+
pass
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
CertificateChoices.componentType = namedtype.NamedTypes(
|
|
526
|
+
namedtype.NamedType('certificate', rfc3280.Certificate()),
|
|
527
|
+
namedtype.NamedType('extendedCertificate', ExtendedCertificate().subtype(
|
|
528
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0))),
|
|
529
|
+
namedtype.NamedType('v1AttrCert', AttributeCertificateV1().subtype(
|
|
530
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1))),
|
|
531
|
+
namedtype.NamedType('v2AttrCert', AttributeCertificateV2().subtype(
|
|
532
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 2))),
|
|
533
|
+
namedtype.NamedType('other', OtherCertificateFormat().subtype(
|
|
534
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 3)))
|
|
535
|
+
)
|
|
536
|
+
|
|
537
|
+
|
|
538
|
+
class CertificateSet(univ.SetOf):
|
|
539
|
+
pass
|
|
540
|
+
|
|
541
|
+
|
|
542
|
+
CertificateSet.componentType = CertificateChoices()
|
|
543
|
+
|
|
544
|
+
|
|
545
|
+
class MessageAuthenticationCode(univ.OctetString):
|
|
546
|
+
pass
|
|
547
|
+
|
|
548
|
+
|
|
549
|
+
class UnsignedAttributes(univ.SetOf):
|
|
550
|
+
pass
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
UnsignedAttributes.componentType = Attribute()
|
|
554
|
+
UnsignedAttributes.sizeSpec = constraint.ValueSizeConstraint(1, MAX)
|
|
555
|
+
|
|
556
|
+
|
|
557
|
+
class SignatureValue(univ.OctetString):
|
|
558
|
+
pass
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
class SignerInfo(univ.Sequence):
|
|
562
|
+
pass
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
SignerInfo.componentType = namedtype.NamedTypes(
|
|
566
|
+
namedtype.NamedType('version', CMSVersion()),
|
|
567
|
+
namedtype.NamedType('sid', SignerIdentifier()),
|
|
568
|
+
namedtype.NamedType('digestAlgorithm', DigestAlgorithmIdentifier()),
|
|
569
|
+
namedtype.OptionalNamedType('signedAttrs', SignedAttributes().subtype(
|
|
570
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
|
|
571
|
+
namedtype.NamedType('signatureAlgorithm', SignatureAlgorithmIdentifier()),
|
|
572
|
+
namedtype.NamedType('signature', SignatureValue()),
|
|
573
|
+
namedtype.OptionalNamedType('unsignedAttrs', UnsignedAttributes().subtype(
|
|
574
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1)))
|
|
575
|
+
)
|
|
576
|
+
|
|
577
|
+
|
|
578
|
+
class SignerInfos(univ.SetOf):
|
|
579
|
+
pass
|
|
580
|
+
|
|
581
|
+
|
|
582
|
+
SignerInfos.componentType = SignerInfo()
|
|
583
|
+
|
|
584
|
+
|
|
585
|
+
class SignedData(univ.Sequence):
|
|
586
|
+
pass
|
|
587
|
+
|
|
588
|
+
|
|
589
|
+
SignedData.componentType = namedtype.NamedTypes(
|
|
590
|
+
namedtype.NamedType('version', CMSVersion()),
|
|
591
|
+
namedtype.NamedType('digestAlgorithms', DigestAlgorithmIdentifiers()),
|
|
592
|
+
namedtype.NamedType('encapContentInfo', EncapsulatedContentInfo()),
|
|
593
|
+
namedtype.OptionalNamedType('certificates', CertificateSet().subtype(
|
|
594
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
|
|
595
|
+
namedtype.OptionalNamedType('crls', RevocationInfoChoices().subtype(
|
|
596
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1))),
|
|
597
|
+
namedtype.NamedType('signerInfos', SignerInfos())
|
|
598
|
+
)
|
|
599
|
+
|
|
600
|
+
|
|
601
|
+
class MessageAuthenticationCodeAlgorithm(rfc3280.AlgorithmIdentifier):
|
|
602
|
+
pass
|
|
603
|
+
|
|
604
|
+
|
|
605
|
+
class MessageDigest(univ.OctetString):
|
|
606
|
+
pass
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
class Time(univ.Choice):
|
|
610
|
+
pass
|
|
611
|
+
|
|
612
|
+
|
|
613
|
+
Time.componentType = namedtype.NamedTypes(
|
|
614
|
+
namedtype.NamedType('utcTime', useful.UTCTime()),
|
|
615
|
+
namedtype.NamedType('generalTime', useful.GeneralizedTime())
|
|
616
|
+
)
|
|
617
|
+
|
|
618
|
+
|
|
619
|
+
class OriginatorInfo(univ.Sequence):
|
|
620
|
+
pass
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
OriginatorInfo.componentType = namedtype.NamedTypes(
|
|
624
|
+
namedtype.OptionalNamedType('certs', CertificateSet().subtype(
|
|
625
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
|
|
626
|
+
namedtype.OptionalNamedType('crls', RevocationInfoChoices().subtype(
|
|
627
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1)))
|
|
628
|
+
)
|
|
629
|
+
|
|
630
|
+
|
|
631
|
+
class AuthAttributes(univ.SetOf):
|
|
632
|
+
pass
|
|
633
|
+
|
|
634
|
+
|
|
635
|
+
AuthAttributes.componentType = Attribute()
|
|
636
|
+
AuthAttributes.sizeSpec = constraint.ValueSizeConstraint(1, MAX)
|
|
637
|
+
|
|
638
|
+
|
|
639
|
+
class AuthenticatedData(univ.Sequence):
|
|
640
|
+
pass
|
|
641
|
+
|
|
642
|
+
|
|
643
|
+
AuthenticatedData.componentType = namedtype.NamedTypes(
|
|
644
|
+
namedtype.NamedType('version', CMSVersion()),
|
|
645
|
+
namedtype.OptionalNamedType('originatorInfo', OriginatorInfo().subtype(
|
|
646
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0))),
|
|
647
|
+
namedtype.NamedType('recipientInfos', RecipientInfos()),
|
|
648
|
+
namedtype.NamedType('macAlgorithm', MessageAuthenticationCodeAlgorithm()),
|
|
649
|
+
namedtype.OptionalNamedType('digestAlgorithm', DigestAlgorithmIdentifier().subtype(
|
|
650
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1))),
|
|
651
|
+
namedtype.NamedType('encapContentInfo', EncapsulatedContentInfo()),
|
|
652
|
+
namedtype.OptionalNamedType('authAttrs', AuthAttributes().subtype(
|
|
653
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 2))),
|
|
654
|
+
namedtype.NamedType('mac', MessageAuthenticationCode()),
|
|
655
|
+
namedtype.OptionalNamedType('unauthAttrs', UnauthAttributes().subtype(
|
|
656
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 3)))
|
|
657
|
+
)
|
|
658
|
+
|
|
659
|
+
id_ct_contentInfo = _buildOid(1, 2, 840, 113549, 1, 9, 16, 1, 6)
|
|
660
|
+
|
|
661
|
+
id_envelopedData = _buildOid(1, 2, 840, 113549, 1, 7, 3)
|
|
662
|
+
|
|
663
|
+
|
|
664
|
+
class EnvelopedData(univ.Sequence):
|
|
665
|
+
pass
|
|
666
|
+
|
|
667
|
+
|
|
668
|
+
EnvelopedData.componentType = namedtype.NamedTypes(
|
|
669
|
+
namedtype.NamedType('version', CMSVersion()),
|
|
670
|
+
namedtype.OptionalNamedType('originatorInfo', OriginatorInfo().subtype(
|
|
671
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0))),
|
|
672
|
+
namedtype.NamedType('recipientInfos', RecipientInfos()),
|
|
673
|
+
namedtype.NamedType('encryptedContentInfo', EncryptedContentInfo()),
|
|
674
|
+
namedtype.OptionalNamedType('unprotectedAttrs', UnprotectedAttributes().subtype(
|
|
675
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1)))
|
|
676
|
+
)
|
|
677
|
+
|
|
678
|
+
|
|
679
|
+
class Countersignature(SignerInfo):
|
|
680
|
+
pass
|
|
681
|
+
|
|
682
|
+
|
|
683
|
+
id_digestedData = _buildOid(1, 2, 840, 113549, 1, 7, 5)
|
|
684
|
+
|
|
685
|
+
id_signingTime = _buildOid(1, 2, 840, 113549, 1, 9, 5)
|
|
686
|
+
|
|
687
|
+
|
|
688
|
+
class ExtendedCertificateOrCertificate(univ.Choice):
|
|
689
|
+
pass
|
|
690
|
+
|
|
691
|
+
|
|
692
|
+
ExtendedCertificateOrCertificate.componentType = namedtype.NamedTypes(
|
|
693
|
+
namedtype.NamedType('certificate', rfc3280.Certificate()),
|
|
694
|
+
namedtype.NamedType('extendedCertificate', ExtendedCertificate().subtype(
|
|
695
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0)))
|
|
696
|
+
)
|
|
697
|
+
|
|
698
|
+
id_encryptedData = _buildOid(1, 2, 840, 113549, 1, 7, 6)
|
|
699
|
+
|
|
700
|
+
id_ct_authData = _buildOid(1, 2, 840, 113549, 1, 9, 16, 1, 2)
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
class SigningTime(Time):
|
|
704
|
+
pass
|
|
705
|
+
|
|
706
|
+
|
|
707
|
+
id_countersignature = _buildOid(1, 2, 840, 113549, 1, 9, 6)
|