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,355 @@
|
|
|
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 add items from the verified errata.
|
|
6
|
+
# Modified by Russ Housley to add maps for use with opentypes.
|
|
7
|
+
# Modified by Russ Housley to include the opentypemap manager.
|
|
8
|
+
#
|
|
9
|
+
# Copyright (c) 2019-2024, Vigil Security, LLC
|
|
10
|
+
# License: http://vigilsec.com/pyasn1-alt-modules-license.txt
|
|
11
|
+
#
|
|
12
|
+
# CMS Firmware Wrapper
|
|
13
|
+
#
|
|
14
|
+
# ASN.1 source from:
|
|
15
|
+
# https://www.rfc-editor.org/rfc/rfc4108.txt
|
|
16
|
+
# https://www.rfc-editor.org/errata_search.php?rfc=4108
|
|
17
|
+
#
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
from pyasn1.type import univ, char, namedtype, namedval, tag, constraint, useful
|
|
21
|
+
|
|
22
|
+
from pyasn1_alt_modules import rfc5280
|
|
23
|
+
from pyasn1_alt_modules import rfc5652
|
|
24
|
+
from pyasn1_alt_modules import opentypemap
|
|
25
|
+
|
|
26
|
+
cmsAttributesMap = opentypemap.get('cmsAttributesMap')
|
|
27
|
+
|
|
28
|
+
cmsContentTypesMap = opentypemap.get('cmsContentTypesMap')
|
|
29
|
+
|
|
30
|
+
otherNamesMap = opentypemap.get('otherNamesMap')
|
|
31
|
+
|
|
32
|
+
MAX = float('inf')
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class HardwareSerialEntry(univ.Choice):
|
|
36
|
+
pass
|
|
37
|
+
|
|
38
|
+
HardwareSerialEntry.componentType = namedtype.NamedTypes(
|
|
39
|
+
namedtype.NamedType('all', univ.Null()),
|
|
40
|
+
namedtype.NamedType('single', univ.OctetString()),
|
|
41
|
+
namedtype.NamedType('block', univ.Sequence(componentType=namedtype.NamedTypes(
|
|
42
|
+
namedtype.NamedType('low', univ.OctetString()),
|
|
43
|
+
namedtype.NamedType('high', univ.OctetString())
|
|
44
|
+
))
|
|
45
|
+
)
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class HardwareModules(univ.Sequence):
|
|
50
|
+
pass
|
|
51
|
+
|
|
52
|
+
HardwareModules.componentType = namedtype.NamedTypes(
|
|
53
|
+
namedtype.NamedType('hwType', univ.ObjectIdentifier()),
|
|
54
|
+
namedtype.NamedType('hwSerialEntries', univ.SequenceOf(componentType=HardwareSerialEntry()))
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
class CommunityIdentifier(univ.Choice):
|
|
59
|
+
pass
|
|
60
|
+
|
|
61
|
+
CommunityIdentifier.componentType = namedtype.NamedTypes(
|
|
62
|
+
namedtype.NamedType('communityOID', univ.ObjectIdentifier()),
|
|
63
|
+
namedtype.NamedType('hwModuleList', HardwareModules())
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
class PreferredPackageIdentifier(univ.Sequence):
|
|
69
|
+
pass
|
|
70
|
+
|
|
71
|
+
PreferredPackageIdentifier.componentType = namedtype.NamedTypes(
|
|
72
|
+
namedtype.NamedType('fwPkgID', univ.ObjectIdentifier()),
|
|
73
|
+
namedtype.NamedType('verNum', univ.Integer().subtype(subtypeSpec=constraint.ValueRangeConstraint(0, MAX)))
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
class PreferredOrLegacyPackageIdentifier(univ.Choice):
|
|
78
|
+
pass
|
|
79
|
+
|
|
80
|
+
PreferredOrLegacyPackageIdentifier.componentType = namedtype.NamedTypes(
|
|
81
|
+
namedtype.NamedType('preferred', PreferredPackageIdentifier()),
|
|
82
|
+
namedtype.NamedType('legacy', univ.OctetString())
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
class CurrentFWConfig(univ.Sequence):
|
|
87
|
+
pass
|
|
88
|
+
|
|
89
|
+
CurrentFWConfig.componentType = namedtype.NamedTypes(
|
|
90
|
+
namedtype.OptionalNamedType('fwPkgType', univ.Integer()),
|
|
91
|
+
namedtype.NamedType('fwPkgName', PreferredOrLegacyPackageIdentifier())
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
class PreferredOrLegacyStalePackageIdentifier(univ.Choice):
|
|
96
|
+
pass
|
|
97
|
+
|
|
98
|
+
PreferredOrLegacyStalePackageIdentifier.componentType = namedtype.NamedTypes(
|
|
99
|
+
namedtype.NamedType('preferredStaleVerNum', univ.Integer().subtype(subtypeSpec=constraint.ValueRangeConstraint(0, MAX))),
|
|
100
|
+
namedtype.NamedType('legacyStaleVersion', univ.OctetString())
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
class FirmwarePackageLoadErrorCode(univ.Enumerated):
|
|
105
|
+
pass
|
|
106
|
+
|
|
107
|
+
FirmwarePackageLoadErrorCode.namedValues = namedval.NamedValues(
|
|
108
|
+
('decodeFailure', 1),
|
|
109
|
+
('badContentInfo', 2),
|
|
110
|
+
('badSignedData', 3),
|
|
111
|
+
('badEncapContent', 4),
|
|
112
|
+
('badCertificate', 5),
|
|
113
|
+
('badSignerInfo', 6),
|
|
114
|
+
('badSignedAttrs', 7),
|
|
115
|
+
('badUnsignedAttrs', 8),
|
|
116
|
+
('missingContent', 9),
|
|
117
|
+
('noTrustAnchor', 10),
|
|
118
|
+
('notAuthorized', 11),
|
|
119
|
+
('badDigestAlgorithm', 12),
|
|
120
|
+
('badSignatureAlgorithm', 13),
|
|
121
|
+
('unsupportedKeySize', 14),
|
|
122
|
+
('signatureFailure', 15),
|
|
123
|
+
('contentTypeMismatch', 16),
|
|
124
|
+
('badEncryptedData', 17),
|
|
125
|
+
('unprotectedAttrsPresent', 18),
|
|
126
|
+
('badEncryptContent', 19),
|
|
127
|
+
('badEncryptAlgorithm', 20),
|
|
128
|
+
('missingCiphertext', 21),
|
|
129
|
+
('noDecryptKey', 22),
|
|
130
|
+
('decryptFailure', 23),
|
|
131
|
+
('badCompressAlgorithm', 24),
|
|
132
|
+
('missingCompressedContent', 25),
|
|
133
|
+
('decompressFailure', 26),
|
|
134
|
+
('wrongHardware', 27),
|
|
135
|
+
('stalePackage', 28),
|
|
136
|
+
('notInCommunity', 29),
|
|
137
|
+
('unsupportedPackageType', 30),
|
|
138
|
+
('missingDependency', 31),
|
|
139
|
+
('wrongDependencyVersion', 32),
|
|
140
|
+
('insufficientMemory', 33),
|
|
141
|
+
('badFirmware', 34),
|
|
142
|
+
('unsupportedParameters', 35),
|
|
143
|
+
('breaksDependency', 36),
|
|
144
|
+
('otherError', 99)
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
class VendorLoadErrorCode(univ.Integer):
|
|
149
|
+
pass
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
# Wrapped Firmware Key Unsigned Attribute and Object Identifier
|
|
153
|
+
|
|
154
|
+
id_aa_wrappedFirmwareKey = univ.ObjectIdentifier('1.2.840.113549.1.9.16.2.39')
|
|
155
|
+
|
|
156
|
+
class WrappedFirmwareKey(rfc5652.EnvelopedData):
|
|
157
|
+
pass
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
# Firmware Package Information Signed Attribute and Object Identifier
|
|
161
|
+
|
|
162
|
+
id_aa_firmwarePackageInfo = univ.ObjectIdentifier('1.2.840.113549.1.9.16.2.42')
|
|
163
|
+
|
|
164
|
+
class FirmwarePackageInfo(univ.Sequence):
|
|
165
|
+
pass
|
|
166
|
+
|
|
167
|
+
FirmwarePackageInfo.componentType = namedtype.NamedTypes(
|
|
168
|
+
namedtype.OptionalNamedType('fwPkgType', univ.Integer()),
|
|
169
|
+
namedtype.OptionalNamedType('dependencies', univ.SequenceOf(componentType=PreferredOrLegacyPackageIdentifier()))
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
FirmwarePackageInfo.sizeSpec = univ.Sequence.sizeSpec + constraint.ValueSizeConstraint(1, 2)
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
# Community Identifiers Signed Attribute and Object Identifier
|
|
176
|
+
|
|
177
|
+
id_aa_communityIdentifiers = univ.ObjectIdentifier('1.2.840.113549.1.9.16.2.40')
|
|
178
|
+
|
|
179
|
+
class CommunityIdentifiers(univ.SequenceOf):
|
|
180
|
+
pass
|
|
181
|
+
|
|
182
|
+
CommunityIdentifiers.componentType = CommunityIdentifier()
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
# Implemented Compression Algorithms Signed Attribute and Object Identifier
|
|
186
|
+
|
|
187
|
+
id_aa_implCompressAlgs = univ.ObjectIdentifier('1.2.840.113549.1.9.16.2.43')
|
|
188
|
+
|
|
189
|
+
class ImplementedCompressAlgorithms(univ.SequenceOf):
|
|
190
|
+
pass
|
|
191
|
+
|
|
192
|
+
ImplementedCompressAlgorithms.componentType = univ.ObjectIdentifier()
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
# Implemented Cryptographic Algorithms Signed Attribute and Object Identifier
|
|
196
|
+
|
|
197
|
+
id_aa_implCryptoAlgs = univ.ObjectIdentifier('1.2.840.113549.1.9.16.2.38')
|
|
198
|
+
|
|
199
|
+
class ImplementedCryptoAlgorithms(univ.SequenceOf):
|
|
200
|
+
pass
|
|
201
|
+
|
|
202
|
+
ImplementedCryptoAlgorithms.componentType = univ.ObjectIdentifier()
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
# Decrypt Key Identifier Signed Attribute and Object Identifier
|
|
206
|
+
|
|
207
|
+
id_aa_decryptKeyID = univ.ObjectIdentifier('1.2.840.113549.1.9.16.2.37')
|
|
208
|
+
|
|
209
|
+
class DecryptKeyIdentifier(univ.OctetString):
|
|
210
|
+
pass
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
# Target Hardware Identifier Signed Attribute and Object Identifier
|
|
214
|
+
|
|
215
|
+
id_aa_targetHardwareIDs = univ.ObjectIdentifier('1.2.840.113549.1.9.16.2.36')
|
|
216
|
+
|
|
217
|
+
class TargetHardwareIdentifiers(univ.SequenceOf):
|
|
218
|
+
pass
|
|
219
|
+
|
|
220
|
+
TargetHardwareIdentifiers.componentType = univ.ObjectIdentifier()
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
# Firmware Package Identifier Signed Attribute and Object Identifier
|
|
224
|
+
|
|
225
|
+
id_aa_firmwarePackageID = univ.ObjectIdentifier('1.2.840.113549.1.9.16.2.35')
|
|
226
|
+
|
|
227
|
+
class FirmwarePackageIdentifier(univ.Sequence):
|
|
228
|
+
pass
|
|
229
|
+
|
|
230
|
+
FirmwarePackageIdentifier.componentType = namedtype.NamedTypes(
|
|
231
|
+
namedtype.NamedType('name', PreferredOrLegacyPackageIdentifier()),
|
|
232
|
+
namedtype.OptionalNamedType('stale', PreferredOrLegacyStalePackageIdentifier())
|
|
233
|
+
)
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
# Firmware Package Message Digest Signed Attribute and Object Identifier
|
|
237
|
+
|
|
238
|
+
id_aa_fwPkgMessageDigest = univ.ObjectIdentifier('1.2.840.113549.1.9.16.2.41')
|
|
239
|
+
|
|
240
|
+
class FirmwarePackageMessageDigest(univ.Sequence):
|
|
241
|
+
pass
|
|
242
|
+
|
|
243
|
+
FirmwarePackageMessageDigest.componentType = namedtype.NamedTypes(
|
|
244
|
+
namedtype.NamedType('algorithm', rfc5280.AlgorithmIdentifier()),
|
|
245
|
+
namedtype.NamedType('msgDigest', univ.OctetString())
|
|
246
|
+
)
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
# Firmware Package Load Error Report Content Type and Object Identifier
|
|
250
|
+
|
|
251
|
+
class FWErrorVersion(univ.Integer):
|
|
252
|
+
pass
|
|
253
|
+
|
|
254
|
+
FWErrorVersion.namedValues = namedval.NamedValues(
|
|
255
|
+
('v1', 1)
|
|
256
|
+
)
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
id_ct_firmwareLoadError = univ.ObjectIdentifier('1.2.840.113549.1.9.16.1.18')
|
|
260
|
+
|
|
261
|
+
class FirmwarePackageLoadError(univ.Sequence):
|
|
262
|
+
pass
|
|
263
|
+
|
|
264
|
+
FirmwarePackageLoadError.componentType = namedtype.NamedTypes(
|
|
265
|
+
namedtype.DefaultedNamedType('version', FWErrorVersion().subtype(value='v1')),
|
|
266
|
+
namedtype.NamedType('hwType', univ.ObjectIdentifier()),
|
|
267
|
+
namedtype.NamedType('hwSerialNum', univ.OctetString()),
|
|
268
|
+
namedtype.NamedType('errorCode', FirmwarePackageLoadErrorCode()),
|
|
269
|
+
namedtype.OptionalNamedType('vendorErrorCode', VendorLoadErrorCode()),
|
|
270
|
+
namedtype.OptionalNamedType('fwPkgName', PreferredOrLegacyPackageIdentifier()),
|
|
271
|
+
namedtype.OptionalNamedType('config', univ.SequenceOf(componentType=CurrentFWConfig()).subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1)))
|
|
272
|
+
)
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
# Firmware Package Load Receipt Content Type and Object Identifier
|
|
276
|
+
|
|
277
|
+
class FWReceiptVersion(univ.Integer):
|
|
278
|
+
pass
|
|
279
|
+
|
|
280
|
+
FWReceiptVersion.namedValues = namedval.NamedValues(
|
|
281
|
+
('v1', 1)
|
|
282
|
+
)
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
id_ct_firmwareLoadReceipt = univ.ObjectIdentifier('1.2.840.113549.1.9.16.1.17')
|
|
286
|
+
|
|
287
|
+
class FirmwarePackageLoadReceipt(univ.Sequence):
|
|
288
|
+
pass
|
|
289
|
+
|
|
290
|
+
FirmwarePackageLoadReceipt.componentType = namedtype.NamedTypes(
|
|
291
|
+
namedtype.DefaultedNamedType('version', FWReceiptVersion().subtype(value='v1')),
|
|
292
|
+
namedtype.NamedType('hwType', univ.ObjectIdentifier()),
|
|
293
|
+
namedtype.NamedType('hwSerialNum', univ.OctetString()),
|
|
294
|
+
namedtype.NamedType('fwPkgName', PreferredOrLegacyPackageIdentifier()),
|
|
295
|
+
namedtype.OptionalNamedType('trustAnchorKeyID', univ.OctetString()),
|
|
296
|
+
namedtype.OptionalNamedType('decryptKeyID', univ.OctetString().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1)))
|
|
297
|
+
)
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
# Firmware Package Content Type and Object Identifier
|
|
301
|
+
|
|
302
|
+
id_ct_firmwarePackage = univ.ObjectIdentifier('1.2.840.113549.1.9.16.1.16')
|
|
303
|
+
|
|
304
|
+
class FirmwarePkgData(univ.OctetString):
|
|
305
|
+
pass
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
# Other Name syntax for Hardware Module Name
|
|
309
|
+
|
|
310
|
+
id_on_hardwareModuleName = univ.ObjectIdentifier('1.3.6.1.5.5.7.8.4')
|
|
311
|
+
|
|
312
|
+
class HardwareModuleName(univ.Sequence):
|
|
313
|
+
pass
|
|
314
|
+
|
|
315
|
+
HardwareModuleName.componentType = namedtype.NamedTypes(
|
|
316
|
+
namedtype.NamedType('hwType', univ.ObjectIdentifier()),
|
|
317
|
+
namedtype.NamedType('hwSerialNum', univ.OctetString())
|
|
318
|
+
)
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
# Update the CMS Attributes Map
|
|
322
|
+
|
|
323
|
+
_cmsAttributesMapUpdate = {
|
|
324
|
+
id_aa_wrappedFirmwareKey: WrappedFirmwareKey(),
|
|
325
|
+
id_aa_firmwarePackageInfo: FirmwarePackageInfo(),
|
|
326
|
+
id_aa_communityIdentifiers: CommunityIdentifiers(),
|
|
327
|
+
id_aa_implCompressAlgs: ImplementedCompressAlgorithms(),
|
|
328
|
+
id_aa_implCryptoAlgs: ImplementedCryptoAlgorithms(),
|
|
329
|
+
id_aa_decryptKeyID: DecryptKeyIdentifier(),
|
|
330
|
+
id_aa_targetHardwareIDs: TargetHardwareIdentifiers(),
|
|
331
|
+
id_aa_firmwarePackageID: FirmwarePackageIdentifier(),
|
|
332
|
+
id_aa_fwPkgMessageDigest: FirmwarePackageMessageDigest(),
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
cmsAttributesMap.update(_cmsAttributesMapUpdate)
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
# Update the CMS Content Types Map
|
|
339
|
+
|
|
340
|
+
_cmsContentTypesMapUpdate = {
|
|
341
|
+
id_ct_firmwareLoadError: FirmwarePackageLoadError(),
|
|
342
|
+
id_ct_firmwareLoadReceipt: FirmwarePackageLoadReceipt(),
|
|
343
|
+
id_ct_firmwarePackage: FirmwarePkgData(),
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
cmsContentTypesMap.update(_cmsContentTypesMapUpdate)
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
# Update the Other Names Map
|
|
350
|
+
|
|
351
|
+
_otherNamesMapUpdate = {
|
|
352
|
+
id_on_hardwareModuleName: HardwareModuleName(),
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
otherNamesMap.update(_otherNamesMapUpdate)
|