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,739 @@
|
|
|
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
|
+
# NSA's CMS Key Management Attributes
|
|
11
|
+
#
|
|
12
|
+
# ASN.1 source from:
|
|
13
|
+
# https://www.rfc-editor.org/rfc/rfc7906.txt
|
|
14
|
+
# https://www.rfc-editor.org/errata/eid5850
|
|
15
|
+
#
|
|
16
|
+
|
|
17
|
+
from pyasn1.type import char
|
|
18
|
+
from pyasn1.type import constraint
|
|
19
|
+
from pyasn1.type import namedtype
|
|
20
|
+
from pyasn1.type import namedval
|
|
21
|
+
from pyasn1.type import tag
|
|
22
|
+
from pyasn1.type import univ
|
|
23
|
+
|
|
24
|
+
from pyasn1_alt_modules import rfc2634
|
|
25
|
+
from pyasn1_alt_modules import rfc4108
|
|
26
|
+
from pyasn1_alt_modules import rfc5280
|
|
27
|
+
from pyasn1_alt_modules import rfc5652
|
|
28
|
+
from pyasn1_alt_modules import rfc6010
|
|
29
|
+
from pyasn1_alt_modules import rfc6019
|
|
30
|
+
from pyasn1_alt_modules import rfc7191
|
|
31
|
+
from pyasn1_alt_modules import opentypemap
|
|
32
|
+
|
|
33
|
+
cmsAttributesMap = opentypemap.get('cmsAttributesMap')
|
|
34
|
+
|
|
35
|
+
MAX = float('inf')
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
# Imports From RFC 2634
|
|
39
|
+
|
|
40
|
+
id_aa_contentHint = rfc2634.id_aa_contentHint
|
|
41
|
+
|
|
42
|
+
ContentHints = rfc2634.ContentHints
|
|
43
|
+
|
|
44
|
+
id_aa_securityLabel = rfc2634.id_aa_securityLabel
|
|
45
|
+
|
|
46
|
+
SecurityPolicyIdentifier = rfc2634.SecurityPolicyIdentifier
|
|
47
|
+
|
|
48
|
+
SecurityClassification = rfc2634.SecurityClassification
|
|
49
|
+
|
|
50
|
+
ESSPrivacyMark = rfc2634.ESSPrivacyMark
|
|
51
|
+
|
|
52
|
+
SecurityCategories= rfc2634.SecurityCategories
|
|
53
|
+
|
|
54
|
+
ESSSecurityLabel = rfc2634.ESSSecurityLabel
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
# Imports From RFC 4108
|
|
58
|
+
|
|
59
|
+
id_aa_communityIdentifiers = rfc4108.id_aa_communityIdentifiers
|
|
60
|
+
|
|
61
|
+
CommunityIdentifier = rfc4108.CommunityIdentifier
|
|
62
|
+
|
|
63
|
+
CommunityIdentifiers = rfc4108.CommunityIdentifiers
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
# Imports From RFC 5280
|
|
67
|
+
|
|
68
|
+
AlgorithmIdentifier = rfc5280.AlgorithmIdentifier
|
|
69
|
+
|
|
70
|
+
Name = rfc5280.Name
|
|
71
|
+
|
|
72
|
+
Certificate = rfc5280.Certificate
|
|
73
|
+
|
|
74
|
+
GeneralNames = rfc5280.GeneralNames
|
|
75
|
+
|
|
76
|
+
GeneralName = rfc5280.GeneralName
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
SubjectInfoAccessSyntax = rfc5280.SubjectInfoAccessSyntax
|
|
80
|
+
|
|
81
|
+
id_pkix = rfc5280.id_pkix
|
|
82
|
+
|
|
83
|
+
id_pe = rfc5280.id_pe
|
|
84
|
+
|
|
85
|
+
id_pe_subjectInfoAccess = rfc5280.id_pe_subjectInfoAccess
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
# Imports From RFC 6010
|
|
89
|
+
|
|
90
|
+
CMSContentConstraints = rfc6010.CMSContentConstraints
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
# Imports From RFC 6019
|
|
94
|
+
|
|
95
|
+
BinaryTime = rfc6019.BinaryTime
|
|
96
|
+
|
|
97
|
+
id_aa_binarySigningTime = rfc6019.id_aa_binarySigningTime
|
|
98
|
+
|
|
99
|
+
BinarySigningTime = rfc6019.BinarySigningTime
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
# Imports From RFC 5652
|
|
103
|
+
|
|
104
|
+
Attribute = rfc5652.Attribute
|
|
105
|
+
|
|
106
|
+
CertificateSet = rfc5652.CertificateSet
|
|
107
|
+
|
|
108
|
+
CertificateChoices = rfc5652.CertificateChoices
|
|
109
|
+
|
|
110
|
+
id_contentType = rfc5652.id_contentType
|
|
111
|
+
|
|
112
|
+
ContentType = rfc5652.ContentType
|
|
113
|
+
|
|
114
|
+
id_messageDigest = rfc5652.id_messageDigest
|
|
115
|
+
|
|
116
|
+
MessageDigest = rfc5652.MessageDigest
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
# Imports From RFC 7191
|
|
120
|
+
|
|
121
|
+
SIREntityName = rfc7191.SIREntityName
|
|
122
|
+
|
|
123
|
+
id_aa_KP_keyPkgIdAndReceiptReq = rfc7191.id_aa_KP_keyPkgIdAndReceiptReq
|
|
124
|
+
|
|
125
|
+
KeyPkgIdentifierAndReceiptReq = rfc7191.KeyPkgIdentifierAndReceiptReq
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
# Key Province Attribute
|
|
129
|
+
|
|
130
|
+
id_aa_KP_keyProvinceV2 = univ.ObjectIdentifier('2.16.840.1.101.2.1.5.71')
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
class KeyProvinceV2(univ.ObjectIdentifier):
|
|
134
|
+
pass
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
aa_keyProvince_v2 = Attribute()
|
|
138
|
+
aa_keyProvince_v2['attrType'] = id_aa_KP_keyProvinceV2
|
|
139
|
+
aa_keyProvince_v2['attrValues'][0] = KeyProvinceV2()
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
# Manifest Attribute
|
|
143
|
+
|
|
144
|
+
id_aa_KP_manifest = univ.ObjectIdentifier('2.16.840.1.101.2.1.5.72')
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
class ShortTitle(char.PrintableString):
|
|
148
|
+
pass
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
class Manifest(univ.SequenceOf):
|
|
152
|
+
pass
|
|
153
|
+
|
|
154
|
+
Manifest.componentType = ShortTitle()
|
|
155
|
+
Manifest.subtypeSpec=constraint.ValueSizeConstraint(1, MAX)
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
aa_manifest = Attribute()
|
|
159
|
+
aa_manifest['attrType'] = id_aa_KP_manifest
|
|
160
|
+
aa_manifest['attrValues'][0] = Manifest()
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
# Key Algorithm Attribute
|
|
164
|
+
|
|
165
|
+
id_kma_keyAlgorithm = univ.ObjectIdentifier('2.16.840.1.101.2.1.13.1')
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
class KeyAlgorithm(univ.Sequence):
|
|
169
|
+
pass
|
|
170
|
+
|
|
171
|
+
KeyAlgorithm.componentType = namedtype.NamedTypes(
|
|
172
|
+
namedtype.NamedType('keyAlg', univ.ObjectIdentifier()),
|
|
173
|
+
namedtype.OptionalNamedType('checkWordAlg', univ.ObjectIdentifier().subtype(
|
|
174
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1))),
|
|
175
|
+
namedtype.OptionalNamedType('crcAlg', univ.ObjectIdentifier().subtype(
|
|
176
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 2)))
|
|
177
|
+
)
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
aa_keyAlgorithm = Attribute()
|
|
181
|
+
aa_keyAlgorithm['attrType'] = id_kma_keyAlgorithm
|
|
182
|
+
aa_keyAlgorithm['attrValues'][0] = KeyAlgorithm()
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
# User Certificate Attribute
|
|
186
|
+
|
|
187
|
+
id_at_userCertificate = univ.ObjectIdentifier('2.5.4.36')
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
aa_userCertificate = Attribute()
|
|
191
|
+
aa_userCertificate['attrType'] = id_at_userCertificate
|
|
192
|
+
aa_userCertificate['attrValues'][0] = Certificate()
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
# Key Package Receivers Attribute
|
|
196
|
+
|
|
197
|
+
id_kma_keyPkgReceiversV2 = univ.ObjectIdentifier('2.16.840.1.101.2.1.13.16')
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
class KeyPkgReceiver(univ.Choice):
|
|
201
|
+
pass
|
|
202
|
+
|
|
203
|
+
KeyPkgReceiver.componentType = namedtype.NamedTypes(
|
|
204
|
+
namedtype.NamedType('sirEntity', SIREntityName().subtype(
|
|
205
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
|
|
206
|
+
namedtype.NamedType('community', CommunityIdentifier().subtype(
|
|
207
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1)))
|
|
208
|
+
)
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
class KeyPkgReceiversV2(univ.SequenceOf):
|
|
212
|
+
pass
|
|
213
|
+
|
|
214
|
+
KeyPkgReceiversV2.componentType = KeyPkgReceiver()
|
|
215
|
+
KeyPkgReceiversV2.subtypeSpec=constraint.ValueSizeConstraint(1, MAX)
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
aa_keyPackageReceivers_v2 = Attribute()
|
|
219
|
+
aa_keyPackageReceivers_v2['attrType'] = id_kma_keyPkgReceiversV2
|
|
220
|
+
aa_keyPackageReceivers_v2['attrValues'][0] = KeyPkgReceiversV2()
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
# TSEC Nomenclature Attribute
|
|
224
|
+
|
|
225
|
+
id_kma_TSECNomenclature = univ.ObjectIdentifier('2.16.840.1.101.2.1.13.3')
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
class CharEdition(char.PrintableString):
|
|
229
|
+
pass
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
class CharEditionRange(univ.Sequence):
|
|
233
|
+
pass
|
|
234
|
+
|
|
235
|
+
CharEditionRange.componentType = namedtype.NamedTypes(
|
|
236
|
+
namedtype.NamedType('firstCharEdition', CharEdition()),
|
|
237
|
+
namedtype.NamedType('lastCharEdition', CharEdition())
|
|
238
|
+
)
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
class NumEdition(univ.Integer):
|
|
242
|
+
pass
|
|
243
|
+
|
|
244
|
+
NumEdition.subtypeSpec = constraint.ValueRangeConstraint(0, 308915776)
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
class NumEditionRange(univ.Sequence):
|
|
248
|
+
pass
|
|
249
|
+
|
|
250
|
+
NumEditionRange.componentType = namedtype.NamedTypes(
|
|
251
|
+
namedtype.NamedType('firstNumEdition', NumEdition()),
|
|
252
|
+
namedtype.NamedType('lastNumEdition', NumEdition())
|
|
253
|
+
)
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
class EditionID(univ.Choice):
|
|
257
|
+
pass
|
|
258
|
+
|
|
259
|
+
EditionID.componentType = namedtype.NamedTypes(
|
|
260
|
+
namedtype.NamedType('char', univ.Choice(componentType=namedtype.NamedTypes(
|
|
261
|
+
namedtype.NamedType('charEdition', CharEdition().subtype(
|
|
262
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1))),
|
|
263
|
+
namedtype.NamedType('charEditionRange', CharEditionRange().subtype(
|
|
264
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 2)))
|
|
265
|
+
))
|
|
266
|
+
),
|
|
267
|
+
namedtype.NamedType('num', univ.Choice(componentType=namedtype.NamedTypes(
|
|
268
|
+
namedtype.NamedType('numEdition', NumEdition().subtype(
|
|
269
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 3))),
|
|
270
|
+
namedtype.NamedType('numEditionRange', NumEditionRange().subtype(
|
|
271
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 4)))
|
|
272
|
+
))
|
|
273
|
+
)
|
|
274
|
+
)
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
class Register(univ.Integer):
|
|
278
|
+
pass
|
|
279
|
+
|
|
280
|
+
Register.subtypeSpec = constraint.ValueRangeConstraint(0, 2147483647)
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
class RegisterRange(univ.Sequence):
|
|
284
|
+
pass
|
|
285
|
+
|
|
286
|
+
RegisterRange.componentType = namedtype.NamedTypes(
|
|
287
|
+
namedtype.NamedType('firstRegister', Register()),
|
|
288
|
+
namedtype.NamedType('lastRegister', Register())
|
|
289
|
+
)
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
class RegisterID(univ.Choice):
|
|
293
|
+
pass
|
|
294
|
+
|
|
295
|
+
RegisterID.componentType = namedtype.NamedTypes(
|
|
296
|
+
namedtype.NamedType('register', Register().subtype(
|
|
297
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 5))),
|
|
298
|
+
namedtype.NamedType('registerRange', RegisterRange().subtype(
|
|
299
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 6)))
|
|
300
|
+
)
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
class SegmentNumber(univ.Integer):
|
|
304
|
+
pass
|
|
305
|
+
|
|
306
|
+
SegmentNumber.subtypeSpec = constraint.ValueRangeConstraint(1, 127)
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
class SegmentRange(univ.Sequence):
|
|
310
|
+
pass
|
|
311
|
+
|
|
312
|
+
SegmentRange.componentType = namedtype.NamedTypes(
|
|
313
|
+
namedtype.NamedType('firstSegment', SegmentNumber()),
|
|
314
|
+
namedtype.NamedType('lastSegment', SegmentNumber())
|
|
315
|
+
)
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
class SegmentID(univ.Choice):
|
|
319
|
+
pass
|
|
320
|
+
|
|
321
|
+
SegmentID.componentType = namedtype.NamedTypes(
|
|
322
|
+
namedtype.NamedType('segmentNumber', SegmentNumber().subtype(
|
|
323
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 7))),
|
|
324
|
+
namedtype.NamedType('segmentRange', SegmentRange().subtype(
|
|
325
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 8)))
|
|
326
|
+
)
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
class TSECNomenclature(univ.Sequence):
|
|
330
|
+
pass
|
|
331
|
+
|
|
332
|
+
TSECNomenclature.componentType = namedtype.NamedTypes(
|
|
333
|
+
namedtype.NamedType('shortTitle', ShortTitle()),
|
|
334
|
+
namedtype.OptionalNamedType('editionID', EditionID()),
|
|
335
|
+
namedtype.OptionalNamedType('registerID', RegisterID()),
|
|
336
|
+
namedtype.OptionalNamedType('segmentID', SegmentID())
|
|
337
|
+
)
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
aa_tsecNomenclature = Attribute()
|
|
341
|
+
aa_tsecNomenclature['attrType'] = id_kma_TSECNomenclature
|
|
342
|
+
aa_tsecNomenclature['attrValues'][0] = TSECNomenclature()
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
# Key Purpose Attribute
|
|
346
|
+
|
|
347
|
+
id_kma_keyPurpose = univ.ObjectIdentifier('2.16.840.1.101.2.1.13.13')
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
class KeyPurpose(univ.Enumerated):
|
|
351
|
+
pass
|
|
352
|
+
|
|
353
|
+
KeyPurpose.namedValues = namedval.NamedValues(
|
|
354
|
+
('n-a', 0),
|
|
355
|
+
('a', 65),
|
|
356
|
+
('b', 66),
|
|
357
|
+
('l', 76),
|
|
358
|
+
('m', 77),
|
|
359
|
+
('r', 82),
|
|
360
|
+
('s', 83),
|
|
361
|
+
('t', 84),
|
|
362
|
+
('v', 86),
|
|
363
|
+
('x', 88),
|
|
364
|
+
('z', 90)
|
|
365
|
+
)
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
aa_keyPurpose = Attribute()
|
|
369
|
+
aa_keyPurpose['attrType'] = id_kma_keyPurpose
|
|
370
|
+
aa_keyPurpose['attrValues'][0] = KeyPurpose()
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
# Key Use Attribute
|
|
374
|
+
|
|
375
|
+
id_kma_keyUse = univ.ObjectIdentifier('2.16.840.1.101.2.1.13.14')
|
|
376
|
+
|
|
377
|
+
|
|
378
|
+
class KeyUse(univ.Enumerated):
|
|
379
|
+
pass
|
|
380
|
+
|
|
381
|
+
KeyUse.namedValues = namedval.NamedValues(
|
|
382
|
+
('n-a', 0),
|
|
383
|
+
('ffk', 1),
|
|
384
|
+
('kek', 2),
|
|
385
|
+
('kpk', 3),
|
|
386
|
+
('msk', 4),
|
|
387
|
+
('qkek', 5),
|
|
388
|
+
('tek', 6),
|
|
389
|
+
('tsk', 7),
|
|
390
|
+
('trkek', 8),
|
|
391
|
+
('nfk', 9),
|
|
392
|
+
('effk', 10),
|
|
393
|
+
('ebfk', 11),
|
|
394
|
+
('aek', 12),
|
|
395
|
+
('wod', 13),
|
|
396
|
+
('kesk', 246),
|
|
397
|
+
('eik', 247),
|
|
398
|
+
('ask', 248),
|
|
399
|
+
('kmk', 249),
|
|
400
|
+
('rsk', 250),
|
|
401
|
+
('csk', 251),
|
|
402
|
+
('sak', 252),
|
|
403
|
+
('rgk', 253),
|
|
404
|
+
('cek', 254),
|
|
405
|
+
('exk', 255)
|
|
406
|
+
)
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
aa_keyUse = Attribute()
|
|
410
|
+
aa_keyPurpose['attrType'] = id_kma_keyUse
|
|
411
|
+
aa_keyPurpose['attrValues'][0] = KeyUse()
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
# Transport Key Attribute
|
|
415
|
+
|
|
416
|
+
id_kma_transportKey = univ.ObjectIdentifier('2.16.840.1.101.2.1.13.15')
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
class TransOp(univ.Enumerated):
|
|
420
|
+
pass
|
|
421
|
+
|
|
422
|
+
TransOp.namedValues = namedval.NamedValues(
|
|
423
|
+
('transport', 1),
|
|
424
|
+
('operational', 2)
|
|
425
|
+
)
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
aa_transportKey = Attribute()
|
|
429
|
+
aa_transportKey['attrType'] = id_kma_transportKey
|
|
430
|
+
aa_transportKey['attrValues'][0] = TransOp()
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
# Key Distribution Period Attribute
|
|
434
|
+
|
|
435
|
+
id_kma_keyDistPeriod = univ.ObjectIdentifier('2.16.840.1.101.2.1.13.5')
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
class KeyDistPeriod(univ.Sequence):
|
|
439
|
+
pass
|
|
440
|
+
|
|
441
|
+
KeyDistPeriod.componentType = namedtype.NamedTypes(
|
|
442
|
+
namedtype.OptionalNamedType('doNotDistBefore', BinaryTime().subtype(
|
|
443
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
|
|
444
|
+
namedtype.NamedType('doNotDistAfter', BinaryTime())
|
|
445
|
+
)
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
aa_keyDistributionPeriod = Attribute()
|
|
449
|
+
aa_keyDistributionPeriod['attrType'] = id_kma_keyDistPeriod
|
|
450
|
+
aa_keyDistributionPeriod['attrValues'][0] = KeyDistPeriod()
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
# Key Validity Period Attribute
|
|
454
|
+
|
|
455
|
+
id_kma_keyValidityPeriod = univ.ObjectIdentifier('2.16.840.1.101.2.1.13.6')
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
class KeyValidityPeriod(univ.Sequence):
|
|
459
|
+
pass
|
|
460
|
+
|
|
461
|
+
KeyValidityPeriod.componentType = namedtype.NamedTypes(
|
|
462
|
+
namedtype.NamedType('doNotUseBefore', BinaryTime()),
|
|
463
|
+
namedtype.OptionalNamedType('doNotUseAfter', BinaryTime())
|
|
464
|
+
)
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
aa_keyValidityPeriod = Attribute()
|
|
468
|
+
aa_keyValidityPeriod['attrType'] = id_kma_keyValidityPeriod
|
|
469
|
+
aa_keyValidityPeriod['attrValues'][0] = KeyValidityPeriod()
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
# Key Duration Attribute
|
|
473
|
+
|
|
474
|
+
id_kma_keyDuration = univ.ObjectIdentifier('2.16.840.1.101.2.1.13.7')
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
ub_KeyDuration_months = univ.Integer(72)
|
|
478
|
+
|
|
479
|
+
ub_KeyDuration_hours = univ.Integer(96)
|
|
480
|
+
|
|
481
|
+
ub_KeyDuration_days = univ.Integer(732)
|
|
482
|
+
|
|
483
|
+
ub_KeyDuration_weeks = univ.Integer(104)
|
|
484
|
+
|
|
485
|
+
ub_KeyDuration_years = univ.Integer(100)
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
class KeyDuration(univ.Choice):
|
|
489
|
+
pass
|
|
490
|
+
|
|
491
|
+
KeyDuration.componentType = namedtype.NamedTypes(
|
|
492
|
+
namedtype.NamedType('hours', univ.Integer().subtype(
|
|
493
|
+
subtypeSpec=constraint.ValueRangeConstraint(1, ub_KeyDuration_hours)).subtype(
|
|
494
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
|
|
495
|
+
namedtype.NamedType('days', univ.Integer().subtype(
|
|
496
|
+
subtypeSpec=constraint.ValueRangeConstraint(1, ub_KeyDuration_days))),
|
|
497
|
+
namedtype.NamedType('weeks', univ.Integer().subtype(
|
|
498
|
+
subtypeSpec=constraint.ValueRangeConstraint(1, ub_KeyDuration_weeks)).subtype(
|
|
499
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1))),
|
|
500
|
+
namedtype.NamedType('months', univ.Integer().subtype(
|
|
501
|
+
subtypeSpec=constraint.ValueRangeConstraint(1, ub_KeyDuration_months)).subtype(
|
|
502
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 2))),
|
|
503
|
+
namedtype.NamedType('years', univ.Integer().subtype(
|
|
504
|
+
subtypeSpec=constraint.ValueRangeConstraint(1, ub_KeyDuration_years)).subtype(
|
|
505
|
+
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 3)))
|
|
506
|
+
)
|
|
507
|
+
|
|
508
|
+
|
|
509
|
+
aa_keyDurationPeriod = Attribute()
|
|
510
|
+
aa_keyDurationPeriod['attrType'] = id_kma_keyDuration
|
|
511
|
+
aa_keyDurationPeriod['attrValues'][0] = KeyDuration()
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
# Classification Attribute
|
|
515
|
+
|
|
516
|
+
id_aa_KP_classification = univ.ObjectIdentifier(id_aa_securityLabel)
|
|
517
|
+
|
|
518
|
+
|
|
519
|
+
id_enumeratedPermissiveAttributes = univ.ObjectIdentifier('2.16.840.1.101.2.1.8.3.1')
|
|
520
|
+
|
|
521
|
+
id_enumeratedRestrictiveAttributes = univ.ObjectIdentifier('2.16.840.1.101.2.1.8.3.4')
|
|
522
|
+
|
|
523
|
+
id_informativeAttributes = univ.ObjectIdentifier('2.16.840.1.101.2.1.8.3.3')
|
|
524
|
+
|
|
525
|
+
|
|
526
|
+
class SecurityAttribute(univ.Integer):
|
|
527
|
+
pass
|
|
528
|
+
|
|
529
|
+
SecurityAttribute.subtypeSpec = constraint.ValueRangeConstraint(0, MAX)
|
|
530
|
+
|
|
531
|
+
|
|
532
|
+
class EnumeratedTag(univ.Sequence):
|
|
533
|
+
pass
|
|
534
|
+
|
|
535
|
+
EnumeratedTag.componentType = namedtype.NamedTypes(
|
|
536
|
+
namedtype.NamedType('tagName', univ.ObjectIdentifier()),
|
|
537
|
+
namedtype.NamedType('attributeList', univ.SetOf(componentType=SecurityAttribute()))
|
|
538
|
+
)
|
|
539
|
+
|
|
540
|
+
|
|
541
|
+
class FreeFormField(univ.Choice):
|
|
542
|
+
pass
|
|
543
|
+
|
|
544
|
+
FreeFormField.componentType = namedtype.NamedTypes(
|
|
545
|
+
namedtype.NamedType('bitSetAttributes', univ.BitString()), # Not permitted in RFC 7906
|
|
546
|
+
namedtype.NamedType('securityAttributes', univ.SetOf(componentType=SecurityAttribute()))
|
|
547
|
+
)
|
|
548
|
+
|
|
549
|
+
|
|
550
|
+
class InformativeTag(univ.Sequence):
|
|
551
|
+
pass
|
|
552
|
+
|
|
553
|
+
InformativeTag.componentType = namedtype.NamedTypes(
|
|
554
|
+
namedtype.NamedType('tagName', univ.ObjectIdentifier()),
|
|
555
|
+
namedtype.NamedType('attributes', FreeFormField())
|
|
556
|
+
)
|
|
557
|
+
|
|
558
|
+
|
|
559
|
+
class Classification(ESSSecurityLabel):
|
|
560
|
+
pass
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
aa_classification = Attribute()
|
|
564
|
+
aa_classification['attrType'] = id_aa_KP_classification
|
|
565
|
+
aa_classification['attrValues'][0] = Classification()
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
# Split Identifier Attribute
|
|
569
|
+
|
|
570
|
+
id_kma_splitID = univ.ObjectIdentifier('2.16.840.1.101.2.1.13.11')
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
class SplitID(univ.Sequence):
|
|
574
|
+
pass
|
|
575
|
+
|
|
576
|
+
SplitID.componentType = namedtype.NamedTypes(
|
|
577
|
+
namedtype.NamedType('half', univ.Enumerated(
|
|
578
|
+
namedValues=namedval.NamedValues(('a', 0), ('b', 1)))),
|
|
579
|
+
namedtype.OptionalNamedType('combineAlg', AlgorithmIdentifier())
|
|
580
|
+
)
|
|
581
|
+
|
|
582
|
+
|
|
583
|
+
aa_splitIdentifier = Attribute()
|
|
584
|
+
aa_splitIdentifier['attrType'] = id_kma_splitID
|
|
585
|
+
aa_splitIdentifier['attrValues'][0] = SplitID()
|
|
586
|
+
|
|
587
|
+
|
|
588
|
+
# Key Package Type Attribute
|
|
589
|
+
|
|
590
|
+
id_kma_keyPkgType = univ.ObjectIdentifier('2.16.840.1.101.2.1.13.12')
|
|
591
|
+
|
|
592
|
+
|
|
593
|
+
class KeyPkgType(univ.ObjectIdentifier):
|
|
594
|
+
pass
|
|
595
|
+
|
|
596
|
+
|
|
597
|
+
aa_keyPackageType = Attribute()
|
|
598
|
+
aa_keyPackageType['attrType'] = id_kma_keyPkgType
|
|
599
|
+
aa_keyPackageType['attrValues'][0] = KeyPkgType()
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
# Signature Usage Attribute
|
|
603
|
+
|
|
604
|
+
id_kma_sigUsageV3 = univ.ObjectIdentifier('2.16.840.1.101.2.1.13.22')
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
class SignatureUsage(CMSContentConstraints):
|
|
608
|
+
pass
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
aa_signatureUsage_v3 = Attribute()
|
|
612
|
+
aa_signatureUsage_v3['attrType'] = id_kma_sigUsageV3
|
|
613
|
+
aa_signatureUsage_v3['attrValues'][0] = SignatureUsage()
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
# Other Certificate Format Attribute
|
|
617
|
+
|
|
618
|
+
id_kma_otherCertFormats = univ.ObjectIdentifier('2.16.840.1.101.2.1.13.19')
|
|
619
|
+
|
|
620
|
+
|
|
621
|
+
aa_otherCertificateFormats = Attribute()
|
|
622
|
+
aa_signatureUsage_v3['attrType'] = id_kma_otherCertFormats
|
|
623
|
+
aa_signatureUsage_v3['attrValues'][0] = CertificateChoices()
|
|
624
|
+
|
|
625
|
+
|
|
626
|
+
# PKI Path Attribute
|
|
627
|
+
|
|
628
|
+
id_at_pkiPath = univ.ObjectIdentifier('2.5.4.70')
|
|
629
|
+
|
|
630
|
+
|
|
631
|
+
class PkiPath(univ.SequenceOf):
|
|
632
|
+
pass
|
|
633
|
+
|
|
634
|
+
PkiPath.componentType = Certificate()
|
|
635
|
+
PkiPath.subtypeSpec=constraint.ValueSizeConstraint(1, MAX)
|
|
636
|
+
|
|
637
|
+
|
|
638
|
+
aa_pkiPath = Attribute()
|
|
639
|
+
aa_pkiPath['attrType'] = id_at_pkiPath
|
|
640
|
+
aa_pkiPath['attrValues'][0] = PkiPath()
|
|
641
|
+
|
|
642
|
+
|
|
643
|
+
# Useful Certificates Attribute
|
|
644
|
+
|
|
645
|
+
id_kma_usefulCerts = univ.ObjectIdentifier('2.16.840.1.101.2.1.13.20')
|
|
646
|
+
|
|
647
|
+
|
|
648
|
+
aa_usefulCertificates = Attribute()
|
|
649
|
+
aa_usefulCertificates['attrType'] = id_kma_usefulCerts
|
|
650
|
+
aa_usefulCertificates['attrValues'][0] = CertificateSet()
|
|
651
|
+
|
|
652
|
+
|
|
653
|
+
# Key Wrap Attribute
|
|
654
|
+
|
|
655
|
+
id_kma_keyWrapAlgorithm = univ.ObjectIdentifier('2.16.840.1.101.2.1.13.21')
|
|
656
|
+
|
|
657
|
+
|
|
658
|
+
aa_keyWrapAlgorithm = Attribute()
|
|
659
|
+
aa_keyWrapAlgorithm['attrType'] = id_kma_keyWrapAlgorithm
|
|
660
|
+
aa_keyWrapAlgorithm['attrValues'][0] = AlgorithmIdentifier()
|
|
661
|
+
|
|
662
|
+
|
|
663
|
+
# Content Decryption Key Identifier Attribute
|
|
664
|
+
|
|
665
|
+
id_aa_KP_contentDecryptKeyID = univ.ObjectIdentifier('2.16.840.1.101.2.1.5.66')
|
|
666
|
+
|
|
667
|
+
|
|
668
|
+
class ContentDecryptKeyID(univ.OctetString):
|
|
669
|
+
pass
|
|
670
|
+
|
|
671
|
+
|
|
672
|
+
aa_contentDecryptKeyIdentifier = Attribute()
|
|
673
|
+
aa_contentDecryptKeyIdentifier['attrType'] = id_aa_KP_contentDecryptKeyID
|
|
674
|
+
aa_contentDecryptKeyIdentifier['attrValues'][0] = ContentDecryptKeyID()
|
|
675
|
+
|
|
676
|
+
|
|
677
|
+
# Certificate Pointers Attribute
|
|
678
|
+
|
|
679
|
+
aa_certificatePointers = Attribute()
|
|
680
|
+
aa_certificatePointers['attrType'] = id_pe_subjectInfoAccess
|
|
681
|
+
aa_certificatePointers['attrValues'][0] = SubjectInfoAccessSyntax()
|
|
682
|
+
|
|
683
|
+
|
|
684
|
+
# CRL Pointers Attribute
|
|
685
|
+
|
|
686
|
+
id_aa_KP_crlPointers = univ.ObjectIdentifier('2.16.840.1.101.2.1.5.70')
|
|
687
|
+
|
|
688
|
+
|
|
689
|
+
aa_cRLDistributionPoints = Attribute()
|
|
690
|
+
aa_cRLDistributionPoints['attrType'] = id_aa_KP_crlPointers
|
|
691
|
+
aa_cRLDistributionPoints['attrValues'][0] = GeneralNames()
|
|
692
|
+
|
|
693
|
+
|
|
694
|
+
# Extended Error Codes
|
|
695
|
+
|
|
696
|
+
id_errorCodes = univ.ObjectIdentifier('2.16.840.1.101.2.1.22')
|
|
697
|
+
|
|
698
|
+
id_missingKeyType = univ.ObjectIdentifier('2.16.840.1.101.2.1.22.1')
|
|
699
|
+
|
|
700
|
+
id_privacyMarkTooLong = univ.ObjectIdentifier('2.16.840.1.101.2.1.22.2')
|
|
701
|
+
|
|
702
|
+
id_unrecognizedSecurityPolicy = univ.ObjectIdentifier('2.16.840.1.101.2.1.22.3')
|
|
703
|
+
|
|
704
|
+
|
|
705
|
+
# Update the CMS Attributes Map
|
|
706
|
+
|
|
707
|
+
_cmsAttributesMapUpdate = {
|
|
708
|
+
id_aa_contentHint: ContentHints(),
|
|
709
|
+
id_aa_communityIdentifiers: CommunityIdentifiers(),
|
|
710
|
+
id_aa_binarySigningTime: BinarySigningTime(),
|
|
711
|
+
id_contentType: ContentType(),
|
|
712
|
+
id_messageDigest: MessageDigest(),
|
|
713
|
+
id_aa_KP_keyPkgIdAndReceiptReq: KeyPkgIdentifierAndReceiptReq(),
|
|
714
|
+
id_aa_KP_keyProvinceV2: KeyProvinceV2(),
|
|
715
|
+
id_aa_KP_manifest: Manifest(),
|
|
716
|
+
id_kma_keyAlgorithm: KeyAlgorithm(),
|
|
717
|
+
id_at_userCertificate: Certificate(),
|
|
718
|
+
id_kma_keyPkgReceiversV2: KeyPkgReceiversV2(),
|
|
719
|
+
id_kma_TSECNomenclature: TSECNomenclature(),
|
|
720
|
+
id_kma_keyPurpose: KeyPurpose(),
|
|
721
|
+
id_kma_keyUse: KeyUse(),
|
|
722
|
+
id_kma_transportKey: TransOp(),
|
|
723
|
+
id_kma_keyDistPeriod: KeyDistPeriod(),
|
|
724
|
+
id_kma_keyValidityPeriod: KeyValidityPeriod(),
|
|
725
|
+
id_kma_keyDuration: KeyDuration(),
|
|
726
|
+
id_aa_KP_classification: Classification(),
|
|
727
|
+
id_kma_splitID: SplitID(),
|
|
728
|
+
id_kma_keyPkgType: KeyPkgType(),
|
|
729
|
+
id_kma_sigUsageV3: SignatureUsage(),
|
|
730
|
+
id_kma_otherCertFormats: CertificateChoices(),
|
|
731
|
+
id_at_pkiPath: PkiPath(),
|
|
732
|
+
id_kma_usefulCerts: CertificateSet(),
|
|
733
|
+
id_kma_keyWrapAlgorithm: AlgorithmIdentifier(),
|
|
734
|
+
id_aa_KP_contentDecryptKeyID: ContentDecryptKeyID(),
|
|
735
|
+
id_pe_subjectInfoAccess: SubjectInfoAccessSyntax(),
|
|
736
|
+
id_aa_KP_crlPointers: GeneralNames(),
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
cmsAttributesMap.update(_cmsAttributesMapUpdate)
|