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.

Files changed (195) hide show
  1. pyasn1_alt_modules/__init__.py +2 -0
  2. pyasn1_alt_modules/opentypemap.py +19 -0
  3. pyasn1_alt_modules/pem.py +66 -0
  4. pyasn1_alt_modules/rfc1155.py +97 -0
  5. pyasn1_alt_modules/rfc1157.py +127 -0
  6. pyasn1_alt_modules/rfc1901.py +23 -0
  7. pyasn1_alt_modules/rfc1902.py +130 -0
  8. pyasn1_alt_modules/rfc1905.py +136 -0
  9. pyasn1_alt_modules/rfc2040.py +50 -0
  10. pyasn1_alt_modules/rfc2251.py +564 -0
  11. pyasn1_alt_modules/rfc2314.py +68 -0
  12. pyasn1_alt_modules/rfc2315.py +325 -0
  13. pyasn1_alt_modules/rfc2437.py +70 -0
  14. pyasn1_alt_modules/rfc2459.py +1340 -0
  15. pyasn1_alt_modules/rfc2511.py +303 -0
  16. pyasn1_alt_modules/rfc2528.py +34 -0
  17. pyasn1_alt_modules/rfc2560.py +226 -0
  18. pyasn1_alt_modules/rfc2631.py +37 -0
  19. pyasn1_alt_modules/rfc2634.py +342 -0
  20. pyasn1_alt_modules/rfc2743.py +60 -0
  21. pyasn1_alt_modules/rfc2876.py +61 -0
  22. pyasn1_alt_modules/rfc2898.py +72 -0
  23. pyasn1_alt_modules/rfc2985.py +593 -0
  24. pyasn1_alt_modules/rfc2986.py +76 -0
  25. pyasn1_alt_modules/rfc3058.py +48 -0
  26. pyasn1_alt_modules/rfc3114.py +80 -0
  27. pyasn1_alt_modules/rfc3125.py +469 -0
  28. pyasn1_alt_modules/rfc3161.py +142 -0
  29. pyasn1_alt_modules/rfc3217.py +42 -0
  30. pyasn1_alt_modules/rfc3274.py +62 -0
  31. pyasn1_alt_modules/rfc3279.py +264 -0
  32. pyasn1_alt_modules/rfc3280.py +1544 -0
  33. pyasn1_alt_modules/rfc3281.py +332 -0
  34. pyasn1_alt_modules/rfc3370.py +142 -0
  35. pyasn1_alt_modules/rfc3412.py +54 -0
  36. pyasn1_alt_modules/rfc3414.py +29 -0
  37. pyasn1_alt_modules/rfc3447.py +46 -0
  38. pyasn1_alt_modules/rfc3537.py +44 -0
  39. pyasn1_alt_modules/rfc3546.py +23 -0
  40. pyasn1_alt_modules/rfc3560.py +74 -0
  41. pyasn1_alt_modules/rfc3565.py +59 -0
  42. pyasn1_alt_modules/rfc3657.py +69 -0
  43. pyasn1_alt_modules/rfc3709.py +230 -0
  44. pyasn1_alt_modules/rfc3739.py +207 -0
  45. pyasn1_alt_modules/rfc3770.py +77 -0
  46. pyasn1_alt_modules/rfc3779.py +139 -0
  47. pyasn1_alt_modules/rfc3820.py +66 -0
  48. pyasn1_alt_modules/rfc3852.py +707 -0
  49. pyasn1_alt_modules/rfc3874.py +29 -0
  50. pyasn1_alt_modules/rfc4010.py +58 -0
  51. pyasn1_alt_modules/rfc4043.py +45 -0
  52. pyasn1_alt_modules/rfc4055.py +285 -0
  53. pyasn1_alt_modules/rfc4056.py +56 -0
  54. pyasn1_alt_modules/rfc4059.py +101 -0
  55. pyasn1_alt_modules/rfc4073.py +62 -0
  56. pyasn1_alt_modules/rfc4108.py +355 -0
  57. pyasn1_alt_modules/rfc4210.py +807 -0
  58. pyasn1_alt_modules/rfc4211.py +420 -0
  59. pyasn1_alt_modules/rfc4231.py +38 -0
  60. pyasn1_alt_modules/rfc4262.py +37 -0
  61. pyasn1_alt_modules/rfc4334.py +78 -0
  62. pyasn1_alt_modules/rfc4357.py +485 -0
  63. pyasn1_alt_modules/rfc4366.py +23 -0
  64. pyasn1_alt_modules/rfc4387.py +23 -0
  65. pyasn1_alt_modules/rfc4476.py +99 -0
  66. pyasn1_alt_modules/rfc4490.py +119 -0
  67. pyasn1_alt_modules/rfc4491.py +44 -0
  68. pyasn1_alt_modules/rfc4683.py +76 -0
  69. pyasn1_alt_modules/rfc4985.py +52 -0
  70. pyasn1_alt_modules/rfc4998.py +125 -0
  71. pyasn1_alt_modules/rfc5035.py +206 -0
  72. pyasn1_alt_modules/rfc5055.py +763 -0
  73. pyasn1_alt_modules/rfc5083.py +55 -0
  74. pyasn1_alt_modules/rfc5084.py +94 -0
  75. pyasn1_alt_modules/rfc5126.py +578 -0
  76. pyasn1_alt_modules/rfc5208.py +73 -0
  77. pyasn1_alt_modules/rfc5275.py +404 -0
  78. pyasn1_alt_modules/rfc5276.py +82 -0
  79. pyasn1_alt_modules/rfc5280.py +1666 -0
  80. pyasn1_alt_modules/rfc5480.py +190 -0
  81. pyasn1_alt_modules/rfc5544.py +127 -0
  82. pyasn1_alt_modules/rfc5636.py +117 -0
  83. pyasn1_alt_modules/rfc5639.py +49 -0
  84. pyasn1_alt_modules/rfc5649.py +33 -0
  85. pyasn1_alt_modules/rfc5652.py +763 -0
  86. pyasn1_alt_modules/rfc5697.py +64 -0
  87. pyasn1_alt_modules/rfc5698.py +159 -0
  88. pyasn1_alt_modules/rfc5751.py +127 -0
  89. pyasn1_alt_modules/rfc5752.py +52 -0
  90. pyasn1_alt_modules/rfc5753.py +163 -0
  91. pyasn1_alt_modules/rfc5755.py +400 -0
  92. pyasn1_alt_modules/rfc5913.py +46 -0
  93. pyasn1_alt_modules/rfc5914.py +119 -0
  94. pyasn1_alt_modules/rfc5915.py +32 -0
  95. pyasn1_alt_modules/rfc5916.py +39 -0
  96. pyasn1_alt_modules/rfc5917.py +59 -0
  97. pyasn1_alt_modules/rfc5924.py +19 -0
  98. pyasn1_alt_modules/rfc5934.py +786 -0
  99. pyasn1_alt_modules/rfc5940.py +62 -0
  100. pyasn1_alt_modules/rfc5958.py +100 -0
  101. pyasn1_alt_modules/rfc5990.py +238 -0
  102. pyasn1_alt_modules/rfc6010.py +92 -0
  103. pyasn1_alt_modules/rfc6019.py +46 -0
  104. pyasn1_alt_modules/rfc6031.py +469 -0
  105. pyasn1_alt_modules/rfc6032.py +71 -0
  106. pyasn1_alt_modules/rfc6066.py +25 -0
  107. pyasn1_alt_modules/rfc6120.py +46 -0
  108. pyasn1_alt_modules/rfc6170.py +17 -0
  109. pyasn1_alt_modules/rfc6187.py +22 -0
  110. pyasn1_alt_modules/rfc6210.py +45 -0
  111. pyasn1_alt_modules/rfc6211.py +75 -0
  112. pyasn1_alt_modules/rfc6402.py +643 -0
  113. pyasn1_alt_modules/rfc6482.py +77 -0
  114. pyasn1_alt_modules/rfc6484.py +17 -0
  115. pyasn1_alt_modules/rfc6486.py +70 -0
  116. pyasn1_alt_modules/rfc6487.py +22 -0
  117. pyasn1_alt_modules/rfc6492.py +41 -0
  118. pyasn1_alt_modules/rfc6493.py +24 -0
  119. pyasn1_alt_modules/rfc6494.py +23 -0
  120. pyasn1_alt_modules/rfc6664.py +151 -0
  121. pyasn1_alt_modules/rfc6955.py +112 -0
  122. pyasn1_alt_modules/rfc6960.py +234 -0
  123. pyasn1_alt_modules/rfc6962.py +52 -0
  124. pyasn1_alt_modules/rfc7030.py +70 -0
  125. pyasn1_alt_modules/rfc7191.py +267 -0
  126. pyasn1_alt_modules/rfc7229.py +29 -0
  127. pyasn1_alt_modules/rfc7292.py +359 -0
  128. pyasn1_alt_modules/rfc7296.py +32 -0
  129. pyasn1_alt_modules/rfc7508.py +92 -0
  130. pyasn1_alt_modules/rfc7585.py +53 -0
  131. pyasn1_alt_modules/rfc7633.py +40 -0
  132. pyasn1_alt_modules/rfc7693.py +66 -0
  133. pyasn1_alt_modules/rfc7773.py +54 -0
  134. pyasn1_alt_modules/rfc7836.py +65 -0
  135. pyasn1_alt_modules/rfc7894.py +100 -0
  136. pyasn1_alt_modules/rfc7906.py +739 -0
  137. pyasn1_alt_modules/rfc7914.py +55 -0
  138. pyasn1_alt_modules/rfc8017.py +159 -0
  139. pyasn1_alt_modules/rfc8018.py +269 -0
  140. pyasn1_alt_modules/rfc8103.py +36 -0
  141. pyasn1_alt_modules/rfc8209.py +20 -0
  142. pyasn1_alt_modules/rfc8226.py +151 -0
  143. pyasn1_alt_modules/rfc8358.py +54 -0
  144. pyasn1_alt_modules/rfc8360.py +46 -0
  145. pyasn1_alt_modules/rfc8398.py +55 -0
  146. pyasn1_alt_modules/rfc8410.py +43 -0
  147. pyasn1_alt_modules/rfc8418.py +36 -0
  148. pyasn1_alt_modules/rfc8419.py +70 -0
  149. pyasn1_alt_modules/rfc8479.py +48 -0
  150. pyasn1_alt_modules/rfc8494.py +80 -0
  151. pyasn1_alt_modules/rfc8520.py +66 -0
  152. pyasn1_alt_modules/rfc8619.py +45 -0
  153. pyasn1_alt_modules/rfc8649.py +42 -0
  154. pyasn1_alt_modules/rfc8692.py +79 -0
  155. pyasn1_alt_modules/rfc8696.py +108 -0
  156. pyasn1_alt_modules/rfc8702.py +109 -0
  157. pyasn1_alt_modules/rfc8708.py +43 -0
  158. pyasn1_alt_modules/rfc8737.py +36 -0
  159. pyasn1_alt_modules/rfc8769.py +21 -0
  160. pyasn1_alt_modules/rfc8894.py +52 -0
  161. pyasn1_alt_modules/rfc8951.py +42 -0
  162. pyasn1_alt_modules/rfc8954.py +238 -0
  163. pyasn1_alt_modules/rfc8994.py +52 -0
  164. pyasn1_alt_modules/rfc8995.py +39 -0
  165. pyasn1_alt_modules/rfc9044.py +80 -0
  166. pyasn1_alt_modules/rfc9092.py +35 -0
  167. pyasn1_alt_modules/rfc9118.py +82 -0
  168. pyasn1_alt_modules/rfc9174.py +55 -0
  169. pyasn1_alt_modules/rfc9189.py +74 -0
  170. pyasn1_alt_modules/rfc9215.py +228 -0
  171. pyasn1_alt_modules/rfc9286.py +78 -0
  172. pyasn1_alt_modules/rfc9289.py +22 -0
  173. pyasn1_alt_modules/rfc9310.py +46 -0
  174. pyasn1_alt_modules/rfc9323.py +129 -0
  175. pyasn1_alt_modules/rfc9336.py +20 -0
  176. pyasn1_alt_modules/rfc9337.py +74 -0
  177. pyasn1_alt_modules/rfc9345.py +36 -0
  178. pyasn1_alt_modules/rfc9385.py +22 -0
  179. pyasn1_alt_modules/rfc9399.py +59 -0
  180. pyasn1_alt_modules/rfc9480.py +731 -0
  181. pyasn1_alt_modules/rfc9481.py +224 -0
  182. pyasn1_alt_modules/rfc9509.py +24 -0
  183. pyasn1_alt_modules/rfc9548.py +23 -0
  184. pyasn1_alt_modules/rfc9579.py +89 -0
  185. pyasn1_alt_modules/rfc9582.py +107 -0
  186. pyasn1_alt_modules/rfc9598.py +52 -0
  187. pyasn1_alt_modules/rfc9608.py +35 -0
  188. pyasn1_alt_modules/rfc9629.py +100 -0
  189. pyasn1_alt_modules/rfc9654.py +241 -0
  190. pyasn1_alt_modules-0.4.5.dist-info/LICENSE.txt +25 -0
  191. pyasn1_alt_modules-0.4.5.dist-info/METADATA +34 -0
  192. pyasn1_alt_modules-0.4.5.dist-info/RECORD +195 -0
  193. pyasn1_alt_modules-0.4.5.dist-info/WHEEL +5 -0
  194. pyasn1_alt_modules-0.4.5.dist-info/top_level.txt +1 -0
  195. pyasn1_alt_modules-0.4.5.dist-info/zip-safe +1 -0
@@ -0,0 +1,1544 @@
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
+ # Internet X.509 Public Key Infrastructure Certificate and Certificate
11
+ # Revocation List (CRL) Profile
12
+ #
13
+ # ASN.1 source from:
14
+ # http://www.ietf.org/rfc/rfc3280.txt
15
+ #
16
+ from pyasn1.type import char
17
+ from pyasn1.type import constraint
18
+ from pyasn1.type import namedtype
19
+ from pyasn1.type import namedval
20
+ from pyasn1.type import tag
21
+ from pyasn1.type import univ
22
+ from pyasn1.type import useful
23
+
24
+ MAX = float('inf')
25
+
26
+
27
+ def _OID(*components):
28
+ output = []
29
+ for x in tuple(components):
30
+ if isinstance(x, univ.ObjectIdentifier):
31
+ output.extend(list(x))
32
+ else:
33
+ output.append(int(x))
34
+
35
+ return univ.ObjectIdentifier(output)
36
+
37
+
38
+ unformatted_postal_address = univ.Integer(16)
39
+
40
+ ub_organizational_units = univ.Integer(4)
41
+
42
+ ub_organizational_unit_name_length = univ.Integer(32)
43
+
44
+
45
+ class OrganizationalUnitName(char.PrintableString):
46
+ pass
47
+
48
+
49
+ OrganizationalUnitName.subtypeSpec = constraint.ValueSizeConstraint(1, ub_organizational_unit_name_length)
50
+
51
+
52
+ class OrganizationalUnitNames(univ.SequenceOf):
53
+ pass
54
+
55
+
56
+ OrganizationalUnitNames.componentType = OrganizationalUnitName()
57
+ OrganizationalUnitNames.sizeSpec = constraint.ValueSizeConstraint(1, ub_organizational_units)
58
+
59
+
60
+ class AttributeType(univ.ObjectIdentifier):
61
+ pass
62
+
63
+
64
+ id_at = _OID(2, 5, 4)
65
+
66
+ id_at_name = _OID(id_at, 41)
67
+
68
+ ub_pds_parameter_length = univ.Integer(30)
69
+
70
+
71
+ class PDSParameter(univ.Set):
72
+ pass
73
+
74
+
75
+ PDSParameter.componentType = namedtype.NamedTypes(
76
+ namedtype.OptionalNamedType('printable-string', char.PrintableString().subtype(
77
+ subtypeSpec=constraint.ValueSizeConstraint(1, ub_pds_parameter_length))),
78
+ namedtype.OptionalNamedType('teletex-string', char.TeletexString().subtype(
79
+ subtypeSpec=constraint.ValueSizeConstraint(1, ub_pds_parameter_length)))
80
+ )
81
+
82
+
83
+ class PhysicalDeliveryOrganizationName(PDSParameter):
84
+ pass
85
+
86
+
87
+ ub_organization_name_length = univ.Integer(64)
88
+
89
+ ub_domain_defined_attribute_type_length = univ.Integer(8)
90
+
91
+ ub_domain_defined_attribute_value_length = univ.Integer(128)
92
+
93
+
94
+ class TeletexDomainDefinedAttribute(univ.Sequence):
95
+ pass
96
+
97
+
98
+ TeletexDomainDefinedAttribute.componentType = namedtype.NamedTypes(
99
+ namedtype.NamedType('type', char.TeletexString().subtype(
100
+ subtypeSpec=constraint.ValueSizeConstraint(1, ub_domain_defined_attribute_type_length))),
101
+ namedtype.NamedType('value', char.TeletexString().subtype(
102
+ subtypeSpec=constraint.ValueSizeConstraint(1, ub_domain_defined_attribute_value_length)))
103
+ )
104
+
105
+ id_pkix = _OID(1, 3, 6, 1, 5, 5, 7)
106
+
107
+ id_qt = _OID(id_pkix, 2)
108
+
109
+
110
+ class PresentationAddress(univ.Sequence):
111
+ pass
112
+
113
+
114
+ PresentationAddress.componentType = namedtype.NamedTypes(
115
+ namedtype.OptionalNamedType('pSelector', univ.OctetString().subtype(
116
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
117
+ namedtype.OptionalNamedType('sSelector', univ.OctetString().subtype(
118
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1))),
119
+ namedtype.OptionalNamedType('tSelector', univ.OctetString().subtype(
120
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 2))),
121
+ namedtype.NamedType('nAddresses', univ.SetOf(componentType=univ.OctetString()).subtype(
122
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 3)))
123
+ )
124
+
125
+
126
+ class AlgorithmIdentifier(univ.Sequence):
127
+ pass
128
+
129
+
130
+ AlgorithmIdentifier.componentType = namedtype.NamedTypes(
131
+ namedtype.NamedType('algorithm', univ.ObjectIdentifier()),
132
+ namedtype.OptionalNamedType('parameters', univ.Any())
133
+ )
134
+
135
+
136
+ class UniqueIdentifier(univ.BitString):
137
+ pass
138
+
139
+
140
+ class Extension(univ.Sequence):
141
+ pass
142
+
143
+
144
+ Extension.componentType = namedtype.NamedTypes(
145
+ namedtype.NamedType('extnID', univ.ObjectIdentifier()),
146
+ namedtype.DefaultedNamedType('critical', univ.Boolean().subtype(value=0)),
147
+ namedtype.NamedType('extnValue', univ.OctetString())
148
+ )
149
+
150
+
151
+ class Extensions(univ.SequenceOf):
152
+ pass
153
+
154
+
155
+ Extensions.componentType = Extension()
156
+ Extensions.sizeSpec = constraint.ValueSizeConstraint(1, MAX)
157
+
158
+
159
+ class CertificateSerialNumber(univ.Integer):
160
+ pass
161
+
162
+
163
+ class SubjectPublicKeyInfo(univ.Sequence):
164
+ pass
165
+
166
+
167
+ SubjectPublicKeyInfo.componentType = namedtype.NamedTypes(
168
+ namedtype.NamedType('algorithm', AlgorithmIdentifier()),
169
+ namedtype.NamedType('subjectPublicKey', univ.BitString())
170
+ )
171
+
172
+
173
+ class Time(univ.Choice):
174
+ pass
175
+
176
+
177
+ Time.componentType = namedtype.NamedTypes(
178
+ namedtype.NamedType('utcTime', useful.UTCTime()),
179
+ namedtype.NamedType('generalTime', useful.GeneralizedTime())
180
+ )
181
+
182
+
183
+ class Validity(univ.Sequence):
184
+ pass
185
+
186
+
187
+ Validity.componentType = namedtype.NamedTypes(
188
+ namedtype.NamedType('notBefore', Time()),
189
+ namedtype.NamedType('notAfter', Time())
190
+ )
191
+
192
+
193
+ class Version(univ.Integer):
194
+ pass
195
+
196
+
197
+ Version.namedValues = namedval.NamedValues(
198
+ ('v1', 0),
199
+ ('v2', 1),
200
+ ('v3', 2)
201
+ )
202
+
203
+
204
+ class AttributeValue(univ.Any):
205
+ pass
206
+
207
+
208
+ class AttributeTypeAndValue(univ.Sequence):
209
+ pass
210
+
211
+
212
+ AttributeTypeAndValue.componentType = namedtype.NamedTypes(
213
+ namedtype.NamedType('type', AttributeType()),
214
+ namedtype.NamedType('value', AttributeValue())
215
+ )
216
+
217
+
218
+ class RelativeDistinguishedName(univ.SetOf):
219
+ pass
220
+
221
+
222
+ RelativeDistinguishedName.componentType = AttributeTypeAndValue()
223
+ RelativeDistinguishedName.sizeSpec = constraint.ValueSizeConstraint(1, MAX)
224
+
225
+
226
+ class RDNSequence(univ.SequenceOf):
227
+ pass
228
+
229
+
230
+ RDNSequence.componentType = RelativeDistinguishedName()
231
+
232
+
233
+ class Name(univ.Choice):
234
+ pass
235
+
236
+
237
+ Name.componentType = namedtype.NamedTypes(
238
+ namedtype.NamedType('rdnSequence', RDNSequence())
239
+ )
240
+
241
+
242
+ class TBSCertificate(univ.Sequence):
243
+ pass
244
+
245
+
246
+ TBSCertificate.componentType = namedtype.NamedTypes(
247
+ namedtype.DefaultedNamedType('version',
248
+ Version().subtype(explicitTag=tag.Tag(tag.tagClassContext,
249
+ tag.tagFormatSimple, 0)).subtype(value="v1")),
250
+ namedtype.NamedType('serialNumber', CertificateSerialNumber()),
251
+ namedtype.NamedType('signature', AlgorithmIdentifier()),
252
+ namedtype.NamedType('issuer', Name()),
253
+ namedtype.NamedType('validity', Validity()),
254
+ namedtype.NamedType('subject', Name()),
255
+ namedtype.NamedType('subjectPublicKeyInfo', SubjectPublicKeyInfo()),
256
+ namedtype.OptionalNamedType('issuerUniqueID', UniqueIdentifier().subtype(
257
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1))),
258
+ namedtype.OptionalNamedType('subjectUniqueID', UniqueIdentifier().subtype(
259
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 2))),
260
+ namedtype.OptionalNamedType('extensions',
261
+ Extensions().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 3)))
262
+ )
263
+
264
+
265
+ class Certificate(univ.Sequence):
266
+ pass
267
+
268
+
269
+ Certificate.componentType = namedtype.NamedTypes(
270
+ namedtype.NamedType('tbsCertificate', TBSCertificate()),
271
+ namedtype.NamedType('signatureAlgorithm', AlgorithmIdentifier()),
272
+ namedtype.NamedType('signature', univ.BitString())
273
+ )
274
+
275
+ ub_surname_length = univ.Integer(40)
276
+
277
+
278
+ class TeletexOrganizationName(char.TeletexString):
279
+ pass
280
+
281
+
282
+ TeletexOrganizationName.subtypeSpec = constraint.ValueSizeConstraint(1, ub_organization_name_length)
283
+
284
+ ub_e163_4_sub_address_length = univ.Integer(40)
285
+
286
+ teletex_common_name = univ.Integer(2)
287
+
288
+ ub_country_name_alpha_length = univ.Integer(2)
289
+
290
+ ub_country_name_numeric_length = univ.Integer(3)
291
+
292
+
293
+ class CountryName(univ.Choice):
294
+ pass
295
+
296
+
297
+ CountryName.tagSet = univ.Choice.tagSet.tagExplicitly(tag.Tag(tag.tagClassApplication, tag.tagFormatConstructed, 1))
298
+ CountryName.componentType = namedtype.NamedTypes(
299
+ namedtype.NamedType('x121-dcc-code', char.NumericString().subtype(
300
+ subtypeSpec=constraint.ValueSizeConstraint(ub_country_name_numeric_length, ub_country_name_numeric_length))),
301
+ namedtype.NamedType('iso-3166-alpha2-code', char.PrintableString().subtype(
302
+ subtypeSpec=constraint.ValueSizeConstraint(ub_country_name_alpha_length, ub_country_name_alpha_length)))
303
+ )
304
+
305
+ extension_OR_address_components = univ.Integer(12)
306
+
307
+ id_at_dnQualifier = _OID(id_at, 46)
308
+
309
+ ub_e163_4_number_length = univ.Integer(15)
310
+
311
+
312
+ class ExtendedNetworkAddress(univ.Choice):
313
+ pass
314
+
315
+
316
+ ExtendedNetworkAddress.componentType = namedtype.NamedTypes(
317
+ namedtype.NamedType('e163-4-address', univ.Sequence(componentType=namedtype.NamedTypes(
318
+ namedtype.NamedType('number', char.NumericString().subtype(
319
+ subtypeSpec=constraint.ValueSizeConstraint(1, ub_e163_4_number_length)).subtype(
320
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
321
+ namedtype.OptionalNamedType('sub-address', char.NumericString().subtype(
322
+ subtypeSpec=constraint.ValueSizeConstraint(1, ub_e163_4_sub_address_length)).subtype(
323
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1)))
324
+ ))
325
+ ),
326
+ namedtype.NamedType('psap-address', PresentationAddress().subtype(
327
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0)))
328
+ )
329
+
330
+ terminal_type = univ.Integer(23)
331
+
332
+ id_domainComponent = _OID(0, 9, 2342, 19200300, 100, 1, 25)
333
+
334
+ ub_state_name = univ.Integer(128)
335
+
336
+
337
+ class X520StateOrProvinceName(univ.Choice):
338
+ pass
339
+
340
+
341
+ X520StateOrProvinceName.componentType = namedtype.NamedTypes(
342
+ namedtype.NamedType('teletexString',
343
+ char.TeletexString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, ub_state_name))),
344
+ namedtype.NamedType('printableString',
345
+ char.PrintableString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, ub_state_name))),
346
+ namedtype.NamedType('universalString',
347
+ char.UniversalString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, ub_state_name))),
348
+ namedtype.NamedType('utf8String',
349
+ char.UTF8String().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, ub_state_name))),
350
+ namedtype.NamedType('bmpString',
351
+ char.BMPString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, ub_state_name)))
352
+ )
353
+
354
+ ub_organization_name = univ.Integer(64)
355
+
356
+
357
+ class X520OrganizationName(univ.Choice):
358
+ pass
359
+
360
+
361
+ X520OrganizationName.componentType = namedtype.NamedTypes(
362
+ namedtype.NamedType('teletexString', char.TeletexString().subtype(
363
+ subtypeSpec=constraint.ValueSizeConstraint(1, ub_organization_name))),
364
+ namedtype.NamedType('printableString', char.PrintableString().subtype(
365
+ subtypeSpec=constraint.ValueSizeConstraint(1, ub_organization_name))),
366
+ namedtype.NamedType('universalString', char.UniversalString().subtype(
367
+ subtypeSpec=constraint.ValueSizeConstraint(1, ub_organization_name))),
368
+ namedtype.NamedType('utf8String',
369
+ char.UTF8String().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, ub_organization_name))),
370
+ namedtype.NamedType('bmpString',
371
+ char.BMPString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, ub_organization_name)))
372
+ )
373
+
374
+ ub_emailaddress_length = univ.Integer(128)
375
+
376
+
377
+ class ExtensionPhysicalDeliveryAddressComponents(PDSParameter):
378
+ pass
379
+
380
+
381
+ id_at_surname = _OID(id_at, 4)
382
+
383
+ ub_common_name_length = univ.Integer(64)
384
+
385
+ id_ad = _OID(id_pkix, 48)
386
+
387
+ ub_numeric_user_id_length = univ.Integer(32)
388
+
389
+
390
+ class NumericUserIdentifier(char.NumericString):
391
+ pass
392
+
393
+
394
+ NumericUserIdentifier.subtypeSpec = constraint.ValueSizeConstraint(1, ub_numeric_user_id_length)
395
+
396
+
397
+ class OrganizationName(char.PrintableString):
398
+ pass
399
+
400
+
401
+ OrganizationName.subtypeSpec = constraint.ValueSizeConstraint(1, ub_organization_name_length)
402
+
403
+ ub_domain_name_length = univ.Integer(16)
404
+
405
+
406
+ class AdministrationDomainName(univ.Choice):
407
+ pass
408
+
409
+
410
+ AdministrationDomainName.tagSet = univ.Choice.tagSet.tagExplicitly(
411
+ tag.Tag(tag.tagClassApplication, tag.tagFormatConstructed, 2))
412
+ AdministrationDomainName.componentType = namedtype.NamedTypes(
413
+ namedtype.NamedType('numeric', char.NumericString().subtype(
414
+ subtypeSpec=constraint.ValueSizeConstraint(0, ub_domain_name_length))),
415
+ namedtype.NamedType('printable', char.PrintableString().subtype(
416
+ subtypeSpec=constraint.ValueSizeConstraint(0, ub_domain_name_length)))
417
+ )
418
+
419
+
420
+ class PrivateDomainName(univ.Choice):
421
+ pass
422
+
423
+
424
+ PrivateDomainName.componentType = namedtype.NamedTypes(
425
+ namedtype.NamedType('numeric', char.NumericString().subtype(
426
+ subtypeSpec=constraint.ValueSizeConstraint(1, ub_domain_name_length))),
427
+ namedtype.NamedType('printable', char.PrintableString().subtype(
428
+ subtypeSpec=constraint.ValueSizeConstraint(1, ub_domain_name_length)))
429
+ )
430
+
431
+ ub_generation_qualifier_length = univ.Integer(3)
432
+
433
+ ub_given_name_length = univ.Integer(16)
434
+
435
+ ub_initials_length = univ.Integer(5)
436
+
437
+
438
+ class PersonalName(univ.Set):
439
+ pass
440
+
441
+
442
+ PersonalName.componentType = namedtype.NamedTypes(
443
+ namedtype.NamedType('surname', char.PrintableString().subtype(
444
+ subtypeSpec=constraint.ValueSizeConstraint(1, ub_surname_length)).subtype(
445
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
446
+ namedtype.OptionalNamedType('given-name', char.PrintableString().subtype(
447
+ subtypeSpec=constraint.ValueSizeConstraint(1, ub_given_name_length)).subtype(
448
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1))),
449
+ namedtype.OptionalNamedType('initials', char.PrintableString().subtype(
450
+ subtypeSpec=constraint.ValueSizeConstraint(1, ub_initials_length)).subtype(
451
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 2))),
452
+ namedtype.OptionalNamedType('generation-qualifier', char.PrintableString().subtype(
453
+ subtypeSpec=constraint.ValueSizeConstraint(1, ub_generation_qualifier_length)).subtype(
454
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 3)))
455
+ )
456
+
457
+ ub_terminal_id_length = univ.Integer(24)
458
+
459
+
460
+ class TerminalIdentifier(char.PrintableString):
461
+ pass
462
+
463
+
464
+ TerminalIdentifier.subtypeSpec = constraint.ValueSizeConstraint(1, ub_terminal_id_length)
465
+
466
+ ub_x121_address_length = univ.Integer(16)
467
+
468
+
469
+ class X121Address(char.NumericString):
470
+ pass
471
+
472
+
473
+ X121Address.subtypeSpec = constraint.ValueSizeConstraint(1, ub_x121_address_length)
474
+
475
+
476
+ class NetworkAddress(X121Address):
477
+ pass
478
+
479
+
480
+ class BuiltInStandardAttributes(univ.Sequence):
481
+ pass
482
+
483
+
484
+ BuiltInStandardAttributes.componentType = namedtype.NamedTypes(
485
+ namedtype.OptionalNamedType('country-name', CountryName()),
486
+ namedtype.OptionalNamedType('administration-domain-name', AdministrationDomainName()),
487
+ namedtype.OptionalNamedType('network-address', NetworkAddress().subtype(
488
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
489
+ namedtype.OptionalNamedType('terminal-identifier', TerminalIdentifier().subtype(
490
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1))),
491
+ namedtype.OptionalNamedType('private-domain-name', PrivateDomainName().subtype(
492
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 2))),
493
+ namedtype.OptionalNamedType('organization-name', OrganizationName().subtype(
494
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 3))),
495
+ namedtype.OptionalNamedType('numeric-user-identifier', NumericUserIdentifier().subtype(
496
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 4))),
497
+ namedtype.OptionalNamedType('personal-name', PersonalName().subtype(
498
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 5))),
499
+ namedtype.OptionalNamedType('organizational-unit-names', OrganizationalUnitNames().subtype(
500
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 6)))
501
+ )
502
+
503
+ ub_domain_defined_attributes = univ.Integer(4)
504
+
505
+
506
+ class BuiltInDomainDefinedAttribute(univ.Sequence):
507
+ pass
508
+
509
+
510
+ BuiltInDomainDefinedAttribute.componentType = namedtype.NamedTypes(
511
+ namedtype.NamedType('type', char.PrintableString().subtype(
512
+ subtypeSpec=constraint.ValueSizeConstraint(1, ub_domain_defined_attribute_type_length))),
513
+ namedtype.NamedType('value', char.PrintableString().subtype(
514
+ subtypeSpec=constraint.ValueSizeConstraint(1, ub_domain_defined_attribute_value_length)))
515
+ )
516
+
517
+
518
+ class BuiltInDomainDefinedAttributes(univ.SequenceOf):
519
+ pass
520
+
521
+
522
+ BuiltInDomainDefinedAttributes.componentType = BuiltInDomainDefinedAttribute()
523
+ BuiltInDomainDefinedAttributes.sizeSpec = constraint.ValueSizeConstraint(1, ub_domain_defined_attributes)
524
+
525
+ ub_extension_attributes = univ.Integer(256)
526
+
527
+
528
+ class ExtensionAttribute(univ.Sequence):
529
+ pass
530
+
531
+
532
+ ExtensionAttribute.componentType = namedtype.NamedTypes(
533
+ namedtype.NamedType('extension-attribute-type', univ.Integer().subtype(
534
+ subtypeSpec=constraint.ValueRangeConstraint(0, ub_extension_attributes)).subtype(
535
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
536
+ namedtype.NamedType('extension-attribute-value',
537
+ univ.Any().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1)))
538
+ )
539
+
540
+
541
+ class ExtensionAttributes(univ.SetOf):
542
+ pass
543
+
544
+
545
+ ExtensionAttributes.componentType = ExtensionAttribute()
546
+ ExtensionAttributes.sizeSpec = constraint.ValueSizeConstraint(1, ub_extension_attributes)
547
+
548
+
549
+ class ORAddress(univ.Sequence):
550
+ pass
551
+
552
+
553
+ ORAddress.componentType = namedtype.NamedTypes(
554
+ namedtype.NamedType('built-in-standard-attributes', BuiltInStandardAttributes()),
555
+ namedtype.OptionalNamedType('built-in-domain-defined-attributes', BuiltInDomainDefinedAttributes()),
556
+ namedtype.OptionalNamedType('extension-attributes', ExtensionAttributes())
557
+ )
558
+
559
+ id_pe = _OID(id_pkix, 1)
560
+
561
+ ub_title = univ.Integer(64)
562
+
563
+
564
+ class X520Title(univ.Choice):
565
+ pass
566
+
567
+
568
+ X520Title.componentType = namedtype.NamedTypes(
569
+ namedtype.NamedType('teletexString',
570
+ char.TeletexString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, ub_title))),
571
+ namedtype.NamedType('printableString',
572
+ char.PrintableString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, ub_title))),
573
+ namedtype.NamedType('universalString',
574
+ char.UniversalString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, ub_title))),
575
+ namedtype.NamedType('utf8String',
576
+ char.UTF8String().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, ub_title))),
577
+ namedtype.NamedType('bmpString', char.BMPString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, ub_title)))
578
+ )
579
+
580
+ id_at_organizationalUnitName = _OID(id_at, 11)
581
+
582
+
583
+ class EmailAddress(char.IA5String):
584
+ pass
585
+
586
+
587
+ EmailAddress.subtypeSpec = constraint.ValueSizeConstraint(1, ub_emailaddress_length)
588
+
589
+ physical_delivery_country_name = univ.Integer(8)
590
+
591
+ id_at_givenName = _OID(id_at, 42)
592
+
593
+
594
+ class TeletexCommonName(char.TeletexString):
595
+ pass
596
+
597
+
598
+ TeletexCommonName.subtypeSpec = constraint.ValueSizeConstraint(1, ub_common_name_length)
599
+
600
+ id_qt_cps = _OID(id_qt, 1)
601
+
602
+
603
+ class LocalPostalAttributes(PDSParameter):
604
+ pass
605
+
606
+
607
+ class StreetAddress(PDSParameter):
608
+ pass
609
+
610
+
611
+ id_kp = _OID(id_pkix, 3)
612
+
613
+
614
+ class DirectoryString(univ.Choice):
615
+ pass
616
+
617
+
618
+ DirectoryString.componentType = namedtype.NamedTypes(
619
+ namedtype.NamedType('teletexString',
620
+ char.TeletexString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, MAX))),
621
+ namedtype.NamedType('printableString',
622
+ char.PrintableString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, MAX))),
623
+ namedtype.NamedType('universalString',
624
+ char.UniversalString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, MAX))),
625
+ namedtype.NamedType('utf8String', char.UTF8String().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, MAX))),
626
+ namedtype.NamedType('bmpString', char.BMPString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, MAX)))
627
+ )
628
+
629
+
630
+ class DomainComponent(char.IA5String):
631
+ pass
632
+
633
+
634
+ id_at_initials = _OID(id_at, 43)
635
+
636
+ id_qt_unotice = _OID(id_qt, 2)
637
+
638
+ ub_pds_name_length = univ.Integer(16)
639
+
640
+
641
+ class PDSName(char.PrintableString):
642
+ pass
643
+
644
+
645
+ PDSName.subtypeSpec = constraint.ValueSizeConstraint(1, ub_pds_name_length)
646
+
647
+
648
+ class PosteRestanteAddress(PDSParameter):
649
+ pass
650
+
651
+
652
+ class DistinguishedName(RDNSequence):
653
+ pass
654
+
655
+
656
+ class CommonName(char.PrintableString):
657
+ pass
658
+
659
+
660
+ CommonName.subtypeSpec = constraint.ValueSizeConstraint(1, ub_common_name_length)
661
+
662
+ ub_serial_number = univ.Integer(64)
663
+
664
+
665
+ class X520SerialNumber(char.PrintableString):
666
+ pass
667
+
668
+
669
+ X520SerialNumber.subtypeSpec = constraint.ValueSizeConstraint(1, ub_serial_number)
670
+
671
+ id_at_generationQualifier = _OID(id_at, 44)
672
+
673
+ ub_organizational_unit_name = univ.Integer(64)
674
+
675
+ id_ad_ocsp = _OID(id_ad, 1)
676
+
677
+
678
+ class TeletexOrganizationalUnitName(char.TeletexString):
679
+ pass
680
+
681
+
682
+ TeletexOrganizationalUnitName.subtypeSpec = constraint.ValueSizeConstraint(1, ub_organizational_unit_name_length)
683
+
684
+
685
+ class TeletexPersonalName(univ.Set):
686
+ pass
687
+
688
+
689
+ TeletexPersonalName.componentType = namedtype.NamedTypes(
690
+ namedtype.NamedType('surname', char.TeletexString().subtype(
691
+ subtypeSpec=constraint.ValueSizeConstraint(1, ub_surname_length)).subtype(
692
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
693
+ namedtype.OptionalNamedType('given-name', char.TeletexString().subtype(
694
+ subtypeSpec=constraint.ValueSizeConstraint(1, ub_given_name_length)).subtype(
695
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1))),
696
+ namedtype.OptionalNamedType('initials', char.TeletexString().subtype(
697
+ subtypeSpec=constraint.ValueSizeConstraint(1, ub_initials_length)).subtype(
698
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 2))),
699
+ namedtype.OptionalNamedType('generation-qualifier', char.TeletexString().subtype(
700
+ subtypeSpec=constraint.ValueSizeConstraint(1, ub_generation_qualifier_length)).subtype(
701
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 3)))
702
+ )
703
+
704
+
705
+ class TeletexDomainDefinedAttributes(univ.SequenceOf):
706
+ pass
707
+
708
+
709
+ TeletexDomainDefinedAttributes.componentType = TeletexDomainDefinedAttribute()
710
+ TeletexDomainDefinedAttributes.sizeSpec = constraint.ValueSizeConstraint(1, ub_domain_defined_attributes)
711
+
712
+
713
+ class TBSCertList(univ.Sequence):
714
+ pass
715
+
716
+
717
+ TBSCertList.componentType = namedtype.NamedTypes(
718
+ namedtype.OptionalNamedType('version', Version()),
719
+ namedtype.NamedType('signature', AlgorithmIdentifier()),
720
+ namedtype.NamedType('issuer', Name()),
721
+ namedtype.NamedType('thisUpdate', Time()),
722
+ namedtype.OptionalNamedType('nextUpdate', Time()),
723
+ namedtype.OptionalNamedType('revokedCertificates',
724
+ univ.SequenceOf(componentType=univ.Sequence(componentType=namedtype.NamedTypes(
725
+ namedtype.NamedType('userCertificate', CertificateSerialNumber()),
726
+ namedtype.NamedType('revocationDate', Time()),
727
+ namedtype.OptionalNamedType('crlEntryExtensions', Extensions())
728
+ ))
729
+ )),
730
+ namedtype.OptionalNamedType('crlExtensions',
731
+ Extensions().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0)))
732
+ )
733
+
734
+ local_postal_attributes = univ.Integer(21)
735
+
736
+ pkcs_9 = _OID(1, 2, 840, 113549, 1, 9)
737
+
738
+
739
+ class PhysicalDeliveryCountryName(univ.Choice):
740
+ pass
741
+
742
+
743
+ PhysicalDeliveryCountryName.componentType = namedtype.NamedTypes(
744
+ namedtype.NamedType('x121-dcc-code', char.NumericString().subtype(
745
+ subtypeSpec=constraint.ValueSizeConstraint(ub_country_name_numeric_length, ub_country_name_numeric_length))),
746
+ namedtype.NamedType('iso-3166-alpha2-code', char.PrintableString().subtype(
747
+ subtypeSpec=constraint.ValueSizeConstraint(ub_country_name_alpha_length, ub_country_name_alpha_length)))
748
+ )
749
+
750
+ ub_name = univ.Integer(32768)
751
+
752
+
753
+ class X520name(univ.Choice):
754
+ pass
755
+
756
+
757
+ X520name.componentType = namedtype.NamedTypes(
758
+ namedtype.NamedType('teletexString',
759
+ char.TeletexString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, ub_name))),
760
+ namedtype.NamedType('printableString',
761
+ char.PrintableString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, ub_name))),
762
+ namedtype.NamedType('universalString',
763
+ char.UniversalString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, ub_name))),
764
+ namedtype.NamedType('utf8String',
765
+ char.UTF8String().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, ub_name))),
766
+ namedtype.NamedType('bmpString', char.BMPString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, ub_name)))
767
+ )
768
+
769
+ id_emailAddress = _OID(pkcs_9, 1)
770
+
771
+
772
+ class TerminalType(univ.Integer):
773
+ pass
774
+
775
+
776
+ TerminalType.namedValues = namedval.NamedValues(
777
+ ('telex', 3),
778
+ ('teletex', 4),
779
+ ('g3-facsimile', 5),
780
+ ('g4-facsimile', 6),
781
+ ('ia5-terminal', 7),
782
+ ('videotex', 8)
783
+ )
784
+
785
+
786
+ class X520OrganizationalUnitName(univ.Choice):
787
+ pass
788
+
789
+
790
+ X520OrganizationalUnitName.componentType = namedtype.NamedTypes(
791
+ namedtype.NamedType('teletexString', char.TeletexString().subtype(
792
+ subtypeSpec=constraint.ValueSizeConstraint(1, ub_organizational_unit_name))),
793
+ namedtype.NamedType('printableString', char.PrintableString().subtype(
794
+ subtypeSpec=constraint.ValueSizeConstraint(1, ub_organizational_unit_name))),
795
+ namedtype.NamedType('universalString', char.UniversalString().subtype(
796
+ subtypeSpec=constraint.ValueSizeConstraint(1, ub_organizational_unit_name))),
797
+ namedtype.NamedType('utf8String', char.UTF8String().subtype(
798
+ subtypeSpec=constraint.ValueSizeConstraint(1, ub_organizational_unit_name))),
799
+ namedtype.NamedType('bmpString', char.BMPString().subtype(
800
+ subtypeSpec=constraint.ValueSizeConstraint(1, ub_organizational_unit_name)))
801
+ )
802
+
803
+ id_at_commonName = _OID(id_at, 3)
804
+
805
+ pds_name = univ.Integer(7)
806
+
807
+ post_office_box_address = univ.Integer(18)
808
+
809
+ ub_locality_name = univ.Integer(128)
810
+
811
+
812
+ class X520LocalityName(univ.Choice):
813
+ pass
814
+
815
+
816
+ X520LocalityName.componentType = namedtype.NamedTypes(
817
+ namedtype.NamedType('teletexString',
818
+ char.TeletexString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, ub_locality_name))),
819
+ namedtype.NamedType('printableString', char.PrintableString().subtype(
820
+ subtypeSpec=constraint.ValueSizeConstraint(1, ub_locality_name))),
821
+ namedtype.NamedType('universalString', char.UniversalString().subtype(
822
+ subtypeSpec=constraint.ValueSizeConstraint(1, ub_locality_name))),
823
+ namedtype.NamedType('utf8String',
824
+ char.UTF8String().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, ub_locality_name))),
825
+ namedtype.NamedType('bmpString',
826
+ char.BMPString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, ub_locality_name)))
827
+ )
828
+
829
+ id_ad_timeStamping = _OID(id_ad, 3)
830
+
831
+ id_at_countryName = _OID(id_at, 6)
832
+
833
+ physical_delivery_personal_name = univ.Integer(13)
834
+
835
+ teletex_personal_name = univ.Integer(4)
836
+
837
+ teletex_organizational_unit_names = univ.Integer(5)
838
+
839
+
840
+ class PhysicalDeliveryPersonalName(PDSParameter):
841
+ pass
842
+
843
+
844
+ ub_postal_code_length = univ.Integer(16)
845
+
846
+
847
+ class PostalCode(univ.Choice):
848
+ pass
849
+
850
+
851
+ PostalCode.componentType = namedtype.NamedTypes(
852
+ namedtype.NamedType('numeric-code', char.NumericString().subtype(
853
+ subtypeSpec=constraint.ValueSizeConstraint(1, ub_postal_code_length))),
854
+ namedtype.NamedType('printable-code', char.PrintableString().subtype(
855
+ subtypeSpec=constraint.ValueSizeConstraint(1, ub_postal_code_length)))
856
+ )
857
+
858
+
859
+ class X520countryName(char.PrintableString):
860
+ pass
861
+
862
+
863
+ X520countryName.subtypeSpec = constraint.ValueSizeConstraint(2, 2)
864
+
865
+ postal_code = univ.Integer(9)
866
+
867
+ id_ad_caRepository = _OID(id_ad, 5)
868
+
869
+ extension_physical_delivery_address_components = univ.Integer(15)
870
+
871
+
872
+ class PostOfficeBoxAddress(PDSParameter):
873
+ pass
874
+
875
+
876
+ class PhysicalDeliveryOfficeName(PDSParameter):
877
+ pass
878
+
879
+
880
+ id_at_title = _OID(id_at, 12)
881
+
882
+ id_at_serialNumber = _OID(id_at, 5)
883
+
884
+ id_ad_caIssuers = _OID(id_ad, 2)
885
+
886
+ ub_integer_options = univ.Integer(256)
887
+
888
+
889
+ class CertificateList(univ.Sequence):
890
+ pass
891
+
892
+
893
+ CertificateList.componentType = namedtype.NamedTypes(
894
+ namedtype.NamedType('tbsCertList', TBSCertList()),
895
+ namedtype.NamedType('signatureAlgorithm', AlgorithmIdentifier()),
896
+ namedtype.NamedType('signature', univ.BitString())
897
+ )
898
+
899
+
900
+ class PhysicalDeliveryOfficeNumber(PDSParameter):
901
+ pass
902
+
903
+
904
+ class TeletexOrganizationalUnitNames(univ.SequenceOf):
905
+ pass
906
+
907
+
908
+ TeletexOrganizationalUnitNames.componentType = TeletexOrganizationalUnitName()
909
+ TeletexOrganizationalUnitNames.sizeSpec = constraint.ValueSizeConstraint(1, ub_organizational_units)
910
+
911
+ physical_delivery_office_name = univ.Integer(10)
912
+
913
+ ub_common_name = univ.Integer(64)
914
+
915
+
916
+ class ExtensionORAddressComponents(PDSParameter):
917
+ pass
918
+
919
+
920
+ ub_pseudonym = univ.Integer(128)
921
+
922
+ poste_restante_address = univ.Integer(19)
923
+
924
+ id_at_organizationName = _OID(id_at, 10)
925
+
926
+ physical_delivery_office_number = univ.Integer(11)
927
+
928
+ id_at_pseudonym = _OID(id_at, 65)
929
+
930
+
931
+ class X520CommonName(univ.Choice):
932
+ pass
933
+
934
+
935
+ X520CommonName.componentType = namedtype.NamedTypes(
936
+ namedtype.NamedType('teletexString',
937
+ char.TeletexString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, ub_common_name))),
938
+ namedtype.NamedType('printableString',
939
+ char.PrintableString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, ub_common_name))),
940
+ namedtype.NamedType('universalString',
941
+ char.UniversalString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, ub_common_name))),
942
+ namedtype.NamedType('utf8String',
943
+ char.UTF8String().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, ub_common_name))),
944
+ namedtype.NamedType('bmpString',
945
+ char.BMPString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, ub_common_name)))
946
+ )
947
+
948
+ physical_delivery_organization_name = univ.Integer(14)
949
+
950
+
951
+ class X520dnQualifier(char.PrintableString):
952
+ pass
953
+
954
+
955
+ id_at_stateOrProvinceName = _OID(id_at, 8)
956
+
957
+ common_name = univ.Integer(1)
958
+
959
+ id_at_localityName = _OID(id_at, 7)
960
+
961
+ ub_match = univ.Integer(128)
962
+
963
+ ub_unformatted_address_length = univ.Integer(180)
964
+
965
+
966
+ class Attribute(univ.Sequence):
967
+ pass
968
+
969
+
970
+ Attribute.componentType = namedtype.NamedTypes(
971
+ namedtype.NamedType('type', AttributeType()),
972
+ namedtype.NamedType('values', univ.SetOf(componentType=AttributeValue()))
973
+ )
974
+
975
+ extended_network_address = univ.Integer(22)
976
+
977
+ unique_postal_name = univ.Integer(20)
978
+
979
+ ub_pds_physical_address_lines = univ.Integer(6)
980
+
981
+
982
+ class UnformattedPostalAddress(univ.Set):
983
+ pass
984
+
985
+
986
+ UnformattedPostalAddress.componentType = namedtype.NamedTypes(
987
+ namedtype.OptionalNamedType('printable-address', univ.SequenceOf(componentType=char.PrintableString().subtype(
988
+ subtypeSpec=constraint.ValueSizeConstraint(1, ub_pds_parameter_length)))),
989
+ namedtype.OptionalNamedType('teletex-string', char.TeletexString().subtype(
990
+ subtypeSpec=constraint.ValueSizeConstraint(1, ub_unformatted_address_length)))
991
+ )
992
+
993
+
994
+ class UniquePostalName(PDSParameter):
995
+ pass
996
+
997
+
998
+ class X520Pseudonym(univ.Choice):
999
+ pass
1000
+
1001
+
1002
+ X520Pseudonym.componentType = namedtype.NamedTypes(
1003
+ namedtype.NamedType('teletexString',
1004
+ char.TeletexString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, ub_pseudonym))),
1005
+ namedtype.NamedType('printableString',
1006
+ char.PrintableString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, ub_pseudonym))),
1007
+ namedtype.NamedType('universalString',
1008
+ char.UniversalString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, ub_pseudonym))),
1009
+ namedtype.NamedType('utf8String',
1010
+ char.UTF8String().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, ub_pseudonym))),
1011
+ namedtype.NamedType('bmpString',
1012
+ char.BMPString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, ub_pseudonym)))
1013
+ )
1014
+
1015
+ teletex_organization_name = univ.Integer(3)
1016
+
1017
+ teletex_domain_defined_attributes = univ.Integer(6)
1018
+
1019
+ street_address = univ.Integer(17)
1020
+
1021
+ id_kp_OCSPSigning = _OID(id_kp, 9)
1022
+
1023
+ id_ce = _OID(2, 5, 29)
1024
+
1025
+ id_ce_certificatePolicies = _OID(id_ce, 32)
1026
+
1027
+
1028
+ class EDIPartyName(univ.Sequence):
1029
+ pass
1030
+
1031
+
1032
+ EDIPartyName.componentType = namedtype.NamedTypes(
1033
+ namedtype.OptionalNamedType('nameAssigner', DirectoryString().subtype(
1034
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
1035
+ namedtype.NamedType('partyName',
1036
+ DirectoryString().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1)))
1037
+ )
1038
+
1039
+
1040
+ class AnotherName(univ.Sequence):
1041
+ pass
1042
+
1043
+
1044
+ AnotherName.componentType = namedtype.NamedTypes(
1045
+ namedtype.NamedType('type-id', univ.ObjectIdentifier()),
1046
+ namedtype.NamedType('value', univ.Any().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0)))
1047
+ )
1048
+
1049
+
1050
+ class GeneralName(univ.Choice):
1051
+ pass
1052
+
1053
+
1054
+ GeneralName.componentType = namedtype.NamedTypes(
1055
+ namedtype.NamedType('otherName',
1056
+ AnotherName().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0))),
1057
+ namedtype.NamedType('rfc822Name',
1058
+ char.IA5String().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1))),
1059
+ namedtype.NamedType('dNSName',
1060
+ char.IA5String().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 2))),
1061
+ namedtype.NamedType('x400Address',
1062
+ ORAddress().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 3))),
1063
+ namedtype.NamedType('directoryName',
1064
+ Name().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 4))),
1065
+ namedtype.NamedType('ediPartyName',
1066
+ EDIPartyName().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 5))),
1067
+ namedtype.NamedType('uniformResourceIdentifier',
1068
+ char.IA5String().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 6))),
1069
+ namedtype.NamedType('iPAddress',
1070
+ univ.OctetString().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 7))),
1071
+ namedtype.NamedType('registeredID', univ.ObjectIdentifier().subtype(
1072
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 8)))
1073
+ )
1074
+
1075
+
1076
+ class GeneralNames(univ.SequenceOf):
1077
+ pass
1078
+
1079
+
1080
+ GeneralNames.componentType = GeneralName()
1081
+ GeneralNames.sizeSpec = constraint.ValueSizeConstraint(1, MAX)
1082
+
1083
+
1084
+ class IssuerAltName(GeneralNames):
1085
+ pass
1086
+
1087
+
1088
+ id_ce_cRLDistributionPoints = _OID(id_ce, 31)
1089
+
1090
+
1091
+ class CertPolicyId(univ.ObjectIdentifier):
1092
+ pass
1093
+
1094
+
1095
+ class PolicyMappings(univ.SequenceOf):
1096
+ pass
1097
+
1098
+
1099
+ PolicyMappings.componentType = univ.Sequence(componentType=namedtype.NamedTypes(
1100
+ namedtype.NamedType('issuerDomainPolicy', CertPolicyId()),
1101
+ namedtype.NamedType('subjectDomainPolicy', CertPolicyId())
1102
+ ))
1103
+
1104
+ PolicyMappings.sizeSpec = constraint.ValueSizeConstraint(1, MAX)
1105
+
1106
+
1107
+ class PolicyQualifierId(univ.ObjectIdentifier):
1108
+ pass
1109
+
1110
+
1111
+ holdInstruction = _OID(2, 2, 840, 10040, 2)
1112
+
1113
+ id_ce_subjectDirectoryAttributes = _OID(id_ce, 9)
1114
+
1115
+ id_holdinstruction_callissuer = _OID(holdInstruction, 2)
1116
+
1117
+
1118
+ class SubjectDirectoryAttributes(univ.SequenceOf):
1119
+ pass
1120
+
1121
+
1122
+ SubjectDirectoryAttributes.componentType = Attribute()
1123
+ SubjectDirectoryAttributes.sizeSpec = constraint.ValueSizeConstraint(1, MAX)
1124
+
1125
+ anyPolicy = _OID(id_ce_certificatePolicies, 0)
1126
+
1127
+ id_ce_subjectAltName = _OID(id_ce, 17)
1128
+
1129
+ id_kp_emailProtection = _OID(id_kp, 4)
1130
+
1131
+
1132
+ class ReasonFlags(univ.BitString):
1133
+ pass
1134
+
1135
+
1136
+ ReasonFlags.namedValues = namedval.NamedValues(
1137
+ ('unused', 0),
1138
+ ('keyCompromise', 1),
1139
+ ('cACompromise', 2),
1140
+ ('affiliationChanged', 3),
1141
+ ('superseded', 4),
1142
+ ('cessationOfOperation', 5),
1143
+ ('certificateHold', 6),
1144
+ ('privilegeWithdrawn', 7),
1145
+ ('aACompromise', 8)
1146
+ )
1147
+
1148
+
1149
+ class DistributionPointName(univ.Choice):
1150
+ pass
1151
+
1152
+
1153
+ DistributionPointName.componentType = namedtype.NamedTypes(
1154
+ namedtype.NamedType('fullName',
1155
+ GeneralNames().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
1156
+ namedtype.NamedType('nameRelativeToCRLIssuer', RelativeDistinguishedName().subtype(
1157
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1)))
1158
+ )
1159
+
1160
+
1161
+ class DistributionPoint(univ.Sequence):
1162
+ pass
1163
+
1164
+
1165
+ DistributionPoint.componentType = namedtype.NamedTypes(
1166
+ namedtype.OptionalNamedType('distributionPoint', DistributionPointName().subtype(
1167
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0))),
1168
+ namedtype.OptionalNamedType('reasons', ReasonFlags().subtype(
1169
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1))),
1170
+ namedtype.OptionalNamedType('cRLIssuer', GeneralNames().subtype(
1171
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 2)))
1172
+ )
1173
+
1174
+ id_ce_keyUsage = _OID(id_ce, 15)
1175
+
1176
+
1177
+ class PolicyQualifierInfo(univ.Sequence):
1178
+ pass
1179
+
1180
+
1181
+ PolicyQualifierInfo.componentType = namedtype.NamedTypes(
1182
+ namedtype.NamedType('policyQualifierId', PolicyQualifierId()),
1183
+ namedtype.NamedType('qualifier', univ.Any())
1184
+ )
1185
+
1186
+
1187
+ class PolicyInformation(univ.Sequence):
1188
+ pass
1189
+
1190
+
1191
+ PolicyInformation.componentType = namedtype.NamedTypes(
1192
+ namedtype.NamedType('policyIdentifier', CertPolicyId()),
1193
+ namedtype.OptionalNamedType('policyQualifiers', univ.SequenceOf(componentType=PolicyQualifierInfo()))
1194
+ )
1195
+
1196
+
1197
+ class CertificatePolicies(univ.SequenceOf):
1198
+ pass
1199
+
1200
+
1201
+ CertificatePolicies.componentType = PolicyInformation()
1202
+ CertificatePolicies.sizeSpec = constraint.ValueSizeConstraint(1, MAX)
1203
+
1204
+ id_ce_basicConstraints = _OID(id_ce, 19)
1205
+
1206
+
1207
+ class HoldInstructionCode(univ.ObjectIdentifier):
1208
+ pass
1209
+
1210
+
1211
+ class KeyPurposeId(univ.ObjectIdentifier):
1212
+ pass
1213
+
1214
+
1215
+ class ExtKeyUsageSyntax(univ.SequenceOf):
1216
+ pass
1217
+
1218
+
1219
+ ExtKeyUsageSyntax.componentType = KeyPurposeId()
1220
+ ExtKeyUsageSyntax.sizeSpec = constraint.ValueSizeConstraint(1, MAX)
1221
+
1222
+
1223
+ class SubjectAltName(GeneralNames):
1224
+ pass
1225
+
1226
+
1227
+ class BasicConstraints(univ.Sequence):
1228
+ pass
1229
+
1230
+
1231
+ BasicConstraints.componentType = namedtype.NamedTypes(
1232
+ namedtype.DefaultedNamedType('cA', univ.Boolean().subtype(value=0)),
1233
+ namedtype.OptionalNamedType('pathLenConstraint',
1234
+ univ.Integer().subtype(subtypeSpec=constraint.ValueRangeConstraint(0, MAX)))
1235
+ )
1236
+
1237
+
1238
+ class SkipCerts(univ.Integer):
1239
+ pass
1240
+
1241
+
1242
+ SkipCerts.subtypeSpec = constraint.ValueRangeConstraint(0, MAX)
1243
+
1244
+
1245
+ class InhibitAnyPolicy(SkipCerts):
1246
+ pass
1247
+
1248
+
1249
+ class CRLNumber(univ.Integer):
1250
+ pass
1251
+
1252
+
1253
+ CRLNumber.subtypeSpec = constraint.ValueRangeConstraint(0, MAX)
1254
+
1255
+
1256
+ class BaseCRLNumber(CRLNumber):
1257
+ pass
1258
+
1259
+
1260
+ class KeyIdentifier(univ.OctetString):
1261
+ pass
1262
+
1263
+
1264
+ class AuthorityKeyIdentifier(univ.Sequence):
1265
+ pass
1266
+
1267
+
1268
+ AuthorityKeyIdentifier.componentType = namedtype.NamedTypes(
1269
+ namedtype.OptionalNamedType('keyIdentifier', KeyIdentifier().subtype(
1270
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
1271
+ namedtype.OptionalNamedType('authorityCertIssuer', GeneralNames().subtype(
1272
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1))),
1273
+ namedtype.OptionalNamedType('authorityCertSerialNumber', CertificateSerialNumber().subtype(
1274
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 2)))
1275
+ )
1276
+
1277
+ id_ce_nameConstraints = _OID(id_ce, 30)
1278
+
1279
+ id_kp_serverAuth = _OID(id_kp, 1)
1280
+
1281
+ id_ce_freshestCRL = _OID(id_ce, 46)
1282
+
1283
+ id_ce_cRLReasons = _OID(id_ce, 21)
1284
+
1285
+
1286
+ class CRLDistributionPoints(univ.SequenceOf):
1287
+ pass
1288
+
1289
+
1290
+ CRLDistributionPoints.componentType = DistributionPoint()
1291
+ CRLDistributionPoints.sizeSpec = constraint.ValueSizeConstraint(1, MAX)
1292
+
1293
+
1294
+ class FreshestCRL(CRLDistributionPoints):
1295
+ pass
1296
+
1297
+
1298
+ id_ce_inhibitAnyPolicy = _OID(id_ce, 54)
1299
+
1300
+
1301
+ class CRLReason(univ.Enumerated):
1302
+ pass
1303
+
1304
+
1305
+ CRLReason.namedValues = namedval.NamedValues(
1306
+ ('unspecified', 0),
1307
+ ('keyCompromise', 1),
1308
+ ('cACompromise', 2),
1309
+ ('affiliationChanged', 3),
1310
+ ('superseded', 4),
1311
+ ('cessationOfOperation', 5),
1312
+ ('certificateHold', 6),
1313
+ ('removeFromCRL', 8),
1314
+ ('privilegeWithdrawn', 9),
1315
+ ('aACompromise', 10)
1316
+ )
1317
+
1318
+
1319
+ class BaseDistance(univ.Integer):
1320
+ pass
1321
+
1322
+
1323
+ BaseDistance.subtypeSpec = constraint.ValueRangeConstraint(0, MAX)
1324
+
1325
+
1326
+ class GeneralSubtree(univ.Sequence):
1327
+ pass
1328
+
1329
+
1330
+ GeneralSubtree.componentType = namedtype.NamedTypes(
1331
+ namedtype.NamedType('base', GeneralName()),
1332
+ namedtype.DefaultedNamedType('minimum', BaseDistance().subtype(
1333
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0)).subtype(value=0)),
1334
+ namedtype.OptionalNamedType('maximum', BaseDistance().subtype(
1335
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1)))
1336
+ )
1337
+
1338
+
1339
+ class GeneralSubtrees(univ.SequenceOf):
1340
+ pass
1341
+
1342
+
1343
+ GeneralSubtrees.componentType = GeneralSubtree()
1344
+ GeneralSubtrees.sizeSpec = constraint.ValueSizeConstraint(1, MAX)
1345
+
1346
+
1347
+ class NameConstraints(univ.Sequence):
1348
+ pass
1349
+
1350
+
1351
+ NameConstraints.componentType = namedtype.NamedTypes(
1352
+ namedtype.OptionalNamedType('permittedSubtrees', GeneralSubtrees().subtype(
1353
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
1354
+ namedtype.OptionalNamedType('excludedSubtrees', GeneralSubtrees().subtype(
1355
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1)))
1356
+ )
1357
+
1358
+ id_pe_authorityInfoAccess = _OID(id_pe, 1)
1359
+
1360
+ id_pe_subjectInfoAccess = _OID(id_pe, 11)
1361
+
1362
+ id_ce_certificateIssuer = _OID(id_ce, 29)
1363
+
1364
+ id_ce_invalidityDate = _OID(id_ce, 24)
1365
+
1366
+
1367
+ class DirectoryString(univ.Choice):
1368
+ pass
1369
+
1370
+
1371
+ DirectoryString.componentType = namedtype.NamedTypes(
1372
+ namedtype.NamedType('any', univ.Any())
1373
+ )
1374
+
1375
+ id_ce_authorityKeyIdentifier = _OID(id_ce, 35)
1376
+
1377
+
1378
+ class AccessDescription(univ.Sequence):
1379
+ pass
1380
+
1381
+
1382
+ AccessDescription.componentType = namedtype.NamedTypes(
1383
+ namedtype.NamedType('accessMethod', univ.ObjectIdentifier()),
1384
+ namedtype.NamedType('accessLocation', GeneralName())
1385
+ )
1386
+
1387
+
1388
+ class AuthorityInfoAccessSyntax(univ.SequenceOf):
1389
+ pass
1390
+
1391
+
1392
+ AuthorityInfoAccessSyntax.componentType = AccessDescription()
1393
+ AuthorityInfoAccessSyntax.sizeSpec = constraint.ValueSizeConstraint(1, MAX)
1394
+
1395
+ id_ce_issuingDistributionPoint = _OID(id_ce, 28)
1396
+
1397
+
1398
+ class CPSuri(char.IA5String):
1399
+ pass
1400
+
1401
+
1402
+ class DisplayText(univ.Choice):
1403
+ pass
1404
+
1405
+
1406
+ DisplayText.componentType = namedtype.NamedTypes(
1407
+ namedtype.NamedType('ia5String', char.IA5String().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, 200))),
1408
+ namedtype.NamedType('visibleString',
1409
+ char.VisibleString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, 200))),
1410
+ namedtype.NamedType('bmpString', char.BMPString().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, 200))),
1411
+ namedtype.NamedType('utf8String', char.UTF8String().subtype(subtypeSpec=constraint.ValueSizeConstraint(1, 200)))
1412
+ )
1413
+
1414
+
1415
+ class NoticeReference(univ.Sequence):
1416
+ pass
1417
+
1418
+
1419
+ NoticeReference.componentType = namedtype.NamedTypes(
1420
+ namedtype.NamedType('organization', DisplayText()),
1421
+ namedtype.NamedType('noticeNumbers', univ.SequenceOf(componentType=univ.Integer()))
1422
+ )
1423
+
1424
+
1425
+ class UserNotice(univ.Sequence):
1426
+ pass
1427
+
1428
+
1429
+ UserNotice.componentType = namedtype.NamedTypes(
1430
+ namedtype.OptionalNamedType('noticeRef', NoticeReference()),
1431
+ namedtype.OptionalNamedType('explicitText', DisplayText())
1432
+ )
1433
+
1434
+
1435
+ class PrivateKeyUsagePeriod(univ.Sequence):
1436
+ pass
1437
+
1438
+
1439
+ PrivateKeyUsagePeriod.componentType = namedtype.NamedTypes(
1440
+ namedtype.OptionalNamedType('notBefore', useful.GeneralizedTime().subtype(
1441
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
1442
+ namedtype.OptionalNamedType('notAfter', useful.GeneralizedTime().subtype(
1443
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1)))
1444
+ )
1445
+
1446
+ id_ce_subjectKeyIdentifier = _OID(id_ce, 14)
1447
+
1448
+
1449
+ class CertificateIssuer(GeneralNames):
1450
+ pass
1451
+
1452
+
1453
+ class InvalidityDate(useful.GeneralizedTime):
1454
+ pass
1455
+
1456
+
1457
+ class SubjectInfoAccessSyntax(univ.SequenceOf):
1458
+ pass
1459
+
1460
+
1461
+ SubjectInfoAccessSyntax.componentType = AccessDescription()
1462
+ SubjectInfoAccessSyntax.sizeSpec = constraint.ValueSizeConstraint(1, MAX)
1463
+
1464
+
1465
+ class KeyUsage(univ.BitString):
1466
+ pass
1467
+
1468
+
1469
+ KeyUsage.namedValues = namedval.NamedValues(
1470
+ ('digitalSignature', 0),
1471
+ ('nonRepudiation', 1),
1472
+ ('keyEncipherment', 2),
1473
+ ('dataEncipherment', 3),
1474
+ ('keyAgreement', 4),
1475
+ ('keyCertSign', 5),
1476
+ ('cRLSign', 6),
1477
+ ('encipherOnly', 7),
1478
+ ('decipherOnly', 8)
1479
+ )
1480
+
1481
+ id_ce_extKeyUsage = _OID(id_ce, 37)
1482
+
1483
+ anyExtendedKeyUsage = _OID(id_ce_extKeyUsage, 0)
1484
+
1485
+ id_ce_privateKeyUsagePeriod = _OID(id_ce, 16)
1486
+
1487
+ id_ce_policyMappings = _OID(id_ce, 33)
1488
+
1489
+ id_ce_cRLNumber = _OID(id_ce, 20)
1490
+
1491
+ id_ce_policyConstraints = _OID(id_ce, 36)
1492
+
1493
+ id_holdinstruction_none = _OID(holdInstruction, 1)
1494
+
1495
+ id_holdinstruction_reject = _OID(holdInstruction, 3)
1496
+
1497
+ id_kp_timeStamping = _OID(id_kp, 8)
1498
+
1499
+
1500
+ class PolicyConstraints(univ.Sequence):
1501
+ pass
1502
+
1503
+
1504
+ PolicyConstraints.componentType = namedtype.NamedTypes(
1505
+ namedtype.OptionalNamedType('requireExplicitPolicy',
1506
+ SkipCerts().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
1507
+ namedtype.OptionalNamedType('inhibitPolicyMapping',
1508
+ SkipCerts().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1)))
1509
+ )
1510
+
1511
+
1512
+ class SubjectKeyIdentifier(KeyIdentifier):
1513
+ pass
1514
+
1515
+
1516
+ id_kp_clientAuth = _OID(id_kp, 2)
1517
+
1518
+ id_ce_deltaCRLIndicator = _OID(id_ce, 27)
1519
+
1520
+ id_ce_issuerAltName = _OID(id_ce, 18)
1521
+
1522
+ id_kp_codeSigning = _OID(id_kp, 3)
1523
+
1524
+ id_ce_holdInstructionCode = _OID(id_ce, 23)
1525
+
1526
+
1527
+ class IssuingDistributionPoint(univ.Sequence):
1528
+ pass
1529
+
1530
+
1531
+ IssuingDistributionPoint.componentType = namedtype.NamedTypes(
1532
+ namedtype.OptionalNamedType('distributionPoint', DistributionPointName().subtype(
1533
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0))),
1534
+ namedtype.DefaultedNamedType('onlyContainsUserCerts', univ.Boolean().subtype(
1535
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1)).subtype(value=0)),
1536
+ namedtype.DefaultedNamedType('onlyContainsCACerts', univ.Boolean().subtype(
1537
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 2)).subtype(value=0)),
1538
+ namedtype.OptionalNamedType('onlySomeReasons', ReasonFlags().subtype(
1539
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 3))),
1540
+ namedtype.DefaultedNamedType('indirectCRL', univ.Boolean().subtype(
1541
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 4)).subtype(value=0)),
1542
+ namedtype.DefaultedNamedType('onlyContainsAttributeCerts', univ.Boolean().subtype(
1543
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 5)).subtype(value=0))
1544
+ )