pyasn1-alt-modules 0.4.2__py2.py3-none-any.whl → 0.4.4__py2.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 (192) hide show
  1. pyasn1_alt_modules/__init__.py +1 -1
  2. pyasn1_alt_modules/opentypemap.py +1 -1
  3. pyasn1_alt_modules/pem.py +1 -1
  4. pyasn1_alt_modules/rfc1155.py +1 -1
  5. pyasn1_alt_modules/rfc1157.py +1 -1
  6. pyasn1_alt_modules/rfc1901.py +1 -1
  7. pyasn1_alt_modules/rfc1902.py +1 -1
  8. pyasn1_alt_modules/rfc1905.py +1 -1
  9. pyasn1_alt_modules/rfc2040.py +1 -1
  10. pyasn1_alt_modules/rfc2251.py +1 -1
  11. pyasn1_alt_modules/rfc2314.py +1 -1
  12. pyasn1_alt_modules/rfc2315.py +1 -1
  13. pyasn1_alt_modules/rfc2437.py +1 -1
  14. pyasn1_alt_modules/rfc2459.py +1 -1
  15. pyasn1_alt_modules/rfc2511.py +1 -1
  16. pyasn1_alt_modules/rfc2528.py +1 -1
  17. pyasn1_alt_modules/rfc2560.py +1 -1
  18. pyasn1_alt_modules/rfc2631.py +1 -1
  19. pyasn1_alt_modules/rfc2634.py +1 -1
  20. pyasn1_alt_modules/rfc2743.py +1 -1
  21. pyasn1_alt_modules/rfc2876.py +1 -1
  22. pyasn1_alt_modules/rfc2898.py +1 -1
  23. pyasn1_alt_modules/rfc2985.py +1 -1
  24. pyasn1_alt_modules/rfc2986.py +1 -1
  25. pyasn1_alt_modules/rfc3058.py +1 -1
  26. pyasn1_alt_modules/rfc3114.py +1 -1
  27. pyasn1_alt_modules/rfc3125.py +1 -1
  28. pyasn1_alt_modules/rfc3161.py +1 -1
  29. pyasn1_alt_modules/rfc3217.py +1 -1
  30. pyasn1_alt_modules/rfc3274.py +1 -1
  31. pyasn1_alt_modules/rfc3279.py +1 -1
  32. pyasn1_alt_modules/rfc3280.py +1 -1
  33. pyasn1_alt_modules/rfc3281.py +1 -1
  34. pyasn1_alt_modules/rfc3370.py +1 -1
  35. pyasn1_alt_modules/rfc3412.py +1 -1
  36. pyasn1_alt_modules/rfc3414.py +1 -1
  37. pyasn1_alt_modules/rfc3447.py +1 -1
  38. pyasn1_alt_modules/rfc3537.py +1 -1
  39. pyasn1_alt_modules/rfc3546.py +23 -0
  40. pyasn1_alt_modules/rfc3560.py +1 -1
  41. pyasn1_alt_modules/rfc3565.py +1 -1
  42. pyasn1_alt_modules/rfc3657.py +1 -1
  43. pyasn1_alt_modules/rfc3709.py +1 -1
  44. pyasn1_alt_modules/rfc3739.py +6 -3
  45. pyasn1_alt_modules/rfc3770.py +1 -1
  46. pyasn1_alt_modules/rfc3779.py +1 -1
  47. pyasn1_alt_modules/rfc3820.py +1 -1
  48. pyasn1_alt_modules/rfc3852.py +1 -1
  49. pyasn1_alt_modules/rfc3874.py +1 -1
  50. pyasn1_alt_modules/rfc4010.py +1 -1
  51. pyasn1_alt_modules/rfc4043.py +1 -1
  52. pyasn1_alt_modules/rfc4055.py +1 -1
  53. pyasn1_alt_modules/rfc4056.py +1 -1
  54. pyasn1_alt_modules/rfc4059.py +1 -1
  55. pyasn1_alt_modules/rfc4073.py +1 -1
  56. pyasn1_alt_modules/rfc4108.py +1 -1
  57. pyasn1_alt_modules/rfc4210.py +1 -1
  58. pyasn1_alt_modules/rfc4211.py +1 -1
  59. pyasn1_alt_modules/rfc4231.py +1 -1
  60. pyasn1_alt_modules/rfc4262.py +1 -1
  61. pyasn1_alt_modules/rfc4334.py +1 -1
  62. pyasn1_alt_modules/rfc4357.py +1 -1
  63. pyasn1_alt_modules/rfc4366.py +23 -0
  64. pyasn1_alt_modules/rfc4387.py +1 -1
  65. pyasn1_alt_modules/rfc4476.py +1 -1
  66. pyasn1_alt_modules/rfc4490.py +1 -1
  67. pyasn1_alt_modules/rfc4491.py +1 -1
  68. pyasn1_alt_modules/rfc4683.py +1 -1
  69. pyasn1_alt_modules/rfc4985.py +1 -1
  70. pyasn1_alt_modules/rfc4998.py +1 -1
  71. pyasn1_alt_modules/rfc5035.py +1 -1
  72. pyasn1_alt_modules/rfc5055.py +1 -1
  73. pyasn1_alt_modules/rfc5083.py +1 -1
  74. pyasn1_alt_modules/rfc5084.py +1 -1
  75. pyasn1_alt_modules/rfc5126.py +1 -1
  76. pyasn1_alt_modules/rfc5208.py +1 -1
  77. pyasn1_alt_modules/rfc5275.py +1 -1
  78. pyasn1_alt_modules/rfc5276.py +1 -1
  79. pyasn1_alt_modules/rfc5280.py +3 -2
  80. pyasn1_alt_modules/rfc5480.py +1 -1
  81. pyasn1_alt_modules/rfc5544.py +1 -1
  82. pyasn1_alt_modules/rfc5636.py +1 -1
  83. pyasn1_alt_modules/rfc5639.py +1 -1
  84. pyasn1_alt_modules/rfc5649.py +1 -1
  85. pyasn1_alt_modules/rfc5652.py +1 -1
  86. pyasn1_alt_modules/rfc5697.py +1 -1
  87. pyasn1_alt_modules/rfc5698.py +1 -1
  88. pyasn1_alt_modules/rfc5751.py +1 -1
  89. pyasn1_alt_modules/rfc5752.py +1 -1
  90. pyasn1_alt_modules/rfc5753.py +1 -1
  91. pyasn1_alt_modules/rfc5755.py +1 -1
  92. pyasn1_alt_modules/rfc5913.py +1 -1
  93. pyasn1_alt_modules/rfc5914.py +1 -1
  94. pyasn1_alt_modules/rfc5915.py +1 -1
  95. pyasn1_alt_modules/rfc5916.py +1 -1
  96. pyasn1_alt_modules/rfc5917.py +1 -1
  97. pyasn1_alt_modules/rfc5924.py +1 -1
  98. pyasn1_alt_modules/rfc5934.py +1 -1
  99. pyasn1_alt_modules/rfc5940.py +1 -1
  100. pyasn1_alt_modules/rfc5958.py +1 -1
  101. pyasn1_alt_modules/rfc5990.py +1 -1
  102. pyasn1_alt_modules/rfc6010.py +1 -1
  103. pyasn1_alt_modules/rfc6019.py +1 -1
  104. pyasn1_alt_modules/rfc6031.py +1 -1
  105. pyasn1_alt_modules/rfc6032.py +1 -1
  106. pyasn1_alt_modules/rfc6066.py +1 -1
  107. pyasn1_alt_modules/rfc6120.py +1 -1
  108. pyasn1_alt_modules/rfc6170.py +1 -1
  109. pyasn1_alt_modules/rfc6187.py +1 -1
  110. pyasn1_alt_modules/rfc6210.py +1 -1
  111. pyasn1_alt_modules/rfc6211.py +1 -1
  112. pyasn1_alt_modules/rfc6402.py +1 -1
  113. pyasn1_alt_modules/rfc6482.py +1 -1
  114. pyasn1_alt_modules/rfc6484.py +1 -1
  115. pyasn1_alt_modules/rfc6486.py +1 -1
  116. pyasn1_alt_modules/rfc6487.py +1 -1
  117. pyasn1_alt_modules/rfc6492.py +1 -1
  118. pyasn1_alt_modules/rfc6493.py +1 -1
  119. pyasn1_alt_modules/rfc6494.py +1 -1
  120. pyasn1_alt_modules/rfc6664.py +1 -1
  121. pyasn1_alt_modules/rfc6955.py +1 -1
  122. pyasn1_alt_modules/rfc6960.py +1 -1
  123. pyasn1_alt_modules/rfc6962.py +1 -1
  124. pyasn1_alt_modules/rfc7030.py +1 -1
  125. pyasn1_alt_modules/rfc7191.py +1 -1
  126. pyasn1_alt_modules/rfc7229.py +1 -1
  127. pyasn1_alt_modules/rfc7292.py +1 -1
  128. pyasn1_alt_modules/rfc7296.py +1 -1
  129. pyasn1_alt_modules/rfc7508.py +1 -1
  130. pyasn1_alt_modules/rfc7585.py +1 -1
  131. pyasn1_alt_modules/rfc7633.py +1 -1
  132. pyasn1_alt_modules/rfc7693.py +1 -1
  133. pyasn1_alt_modules/rfc7773.py +1 -1
  134. pyasn1_alt_modules/rfc7836.py +1 -1
  135. pyasn1_alt_modules/rfc7894.py +1 -1
  136. pyasn1_alt_modules/rfc7906.py +1 -1
  137. pyasn1_alt_modules/rfc7914.py +1 -1
  138. pyasn1_alt_modules/rfc8017.py +1 -1
  139. pyasn1_alt_modules/rfc8018.py +1 -1
  140. pyasn1_alt_modules/rfc8103.py +1 -1
  141. pyasn1_alt_modules/rfc8209.py +1 -1
  142. pyasn1_alt_modules/rfc8226.py +1 -1
  143. pyasn1_alt_modules/rfc8358.py +1 -1
  144. pyasn1_alt_modules/rfc8360.py +1 -1
  145. pyasn1_alt_modules/rfc8398.py +1 -1
  146. pyasn1_alt_modules/rfc8410.py +1 -1
  147. pyasn1_alt_modules/rfc8418.py +1 -1
  148. pyasn1_alt_modules/rfc8419.py +1 -1
  149. pyasn1_alt_modules/rfc8479.py +1 -1
  150. pyasn1_alt_modules/rfc8494.py +1 -1
  151. pyasn1_alt_modules/rfc8520.py +1 -1
  152. pyasn1_alt_modules/rfc8619.py +1 -1
  153. pyasn1_alt_modules/rfc8649.py +1 -1
  154. pyasn1_alt_modules/rfc8692.py +1 -1
  155. pyasn1_alt_modules/rfc8696.py +1 -1
  156. pyasn1_alt_modules/rfc8702.py +1 -1
  157. pyasn1_alt_modules/rfc8708.py +1 -1
  158. pyasn1_alt_modules/rfc8737.py +1 -1
  159. pyasn1_alt_modules/rfc8769.py +1 -1
  160. pyasn1_alt_modules/rfc8894.py +1 -1
  161. pyasn1_alt_modules/rfc8951.py +1 -1
  162. pyasn1_alt_modules/rfc8954.py +238 -0
  163. pyasn1_alt_modules/rfc8994.py +1 -1
  164. pyasn1_alt_modules/rfc8995.py +1 -1
  165. pyasn1_alt_modules/rfc9044.py +1 -1
  166. pyasn1_alt_modules/rfc9092.py +1 -1
  167. pyasn1_alt_modules/rfc9118.py +1 -1
  168. pyasn1_alt_modules/rfc9174.py +1 -1
  169. pyasn1_alt_modules/rfc9189.py +1 -1
  170. pyasn1_alt_modules/rfc9215.py +11 -1
  171. pyasn1_alt_modules/rfc9286.py +1 -1
  172. pyasn1_alt_modules/rfc9289.py +1 -1
  173. pyasn1_alt_modules/rfc9310.py +1 -1
  174. pyasn1_alt_modules/rfc9323.py +1 -1
  175. pyasn1_alt_modules/rfc9336.py +1 -1
  176. pyasn1_alt_modules/rfc9337.py +1 -1
  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 +717 -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-0.4.2.dist-info → pyasn1_alt_modules-0.4.4.dist-info}/LICENSE.txt +1 -1
  185. {pyasn1_alt_modules-0.4.2.dist-info → pyasn1_alt_modules-0.4.4.dist-info}/METADATA +7 -7
  186. pyasn1_alt_modules-0.4.4.dist-info/RECORD +189 -0
  187. {pyasn1_alt_modules-0.4.2.dist-info → pyasn1_alt_modules-0.4.4.dist-info}/WHEEL +1 -1
  188. pyasn1_alt_modules/addon.py +0 -284
  189. pyasn1_alt_modules/rfc5794.py +0 -391
  190. pyasn1_alt_modules-0.4.2.dist-info/RECORD +0 -181
  191. {pyasn1_alt_modules-0.4.2.dist-info → pyasn1_alt_modules-0.4.4.dist-info}/top_level.txt +0 -0
  192. {pyasn1_alt_modules-0.4.2.dist-info → pyasn1_alt_modules-0.4.4.dist-info}/zip-safe +0 -0
@@ -0,0 +1,238 @@
1
+ #
2
+ # This file is part of pyasn1-alt-modules software.
3
+ #
4
+ # Created by Russ Housley.
5
+ #
6
+ # Copyright (c) 2024, Vigil Security, LLC
7
+ # License: http://vigilsec.com/pyasn1-alt-modules-license.txt
8
+ #
9
+ # Online Certificate Status Protocol (OCSP) with nonce size constraints
10
+ #
11
+ # ASN.1 source from:
12
+ # https://www.rfc-editor.org/rfc/rfc6960.txt
13
+ # https://www.rfc-editor.org/rfc/rfc8954.txt
14
+ #
15
+
16
+ from pyasn1.type import char
17
+ from pyasn1.type import constraint
18
+ from pyasn1.type import namedtype
19
+ from pyasn1.type import tag
20
+ from pyasn1.type import univ
21
+ from pyasn1.type import useful
22
+
23
+ from pyasn1_alt_modules import rfc2560
24
+ from pyasn1_alt_modules import rfc5280
25
+ from pyasn1_alt_modules import opentypemap
26
+
27
+ certificateExtensionsMap = opentypemap.get('certificateExtensionsMap')
28
+
29
+ ocspResponseMap = opentypemap.get('ocspResponseMap')
30
+
31
+ MAX = float('inf')
32
+
33
+
34
+ # Imports from RFC 5280
35
+
36
+ AlgorithmIdentifier = rfc5280.AlgorithmIdentifier
37
+ AuthorityInfoAccessSyntax = rfc5280.AuthorityInfoAccessSyntax
38
+ Certificate = rfc5280.Certificate
39
+ CertificateSerialNumber = rfc5280.CertificateSerialNumber
40
+ CRLReason = rfc5280.CRLReason
41
+ Extensions = rfc5280.Extensions
42
+ GeneralName = rfc5280.GeneralName
43
+ Name = rfc5280.Name
44
+
45
+ id_kp = rfc5280.id_kp
46
+
47
+ id_ad_ocsp = rfc5280.id_ad_ocsp
48
+
49
+
50
+ # Imports from the original OCSP module in RFC 2560
51
+
52
+ AcceptableResponses = rfc2560.AcceptableResponses
53
+ ArchiveCutoff = rfc2560.ArchiveCutoff
54
+ CertStatus = rfc2560.CertStatus
55
+ KeyHash = rfc2560.KeyHash
56
+ OCSPResponse = rfc2560.OCSPResponse
57
+ OCSPResponseStatus = rfc2560.OCSPResponseStatus
58
+ ResponseBytes = rfc2560.ResponseBytes
59
+ RevokedInfo = rfc2560.RevokedInfo
60
+ UnknownInfo = rfc2560.UnknownInfo
61
+ Version = rfc2560.Version
62
+
63
+ id_kp_OCSPSigning = rfc2560.id_kp_OCSPSigning
64
+
65
+ id_pkix_ocsp = rfc2560.id_pkix_ocsp
66
+ id_pkix_ocsp_archive_cutoff = rfc2560.id_pkix_ocsp_archive_cutoff
67
+ id_pkix_ocsp_basic = rfc2560.id_pkix_ocsp_basic
68
+ id_pkix_ocsp_crl = rfc2560.id_pkix_ocsp_crl
69
+ id_pkix_ocsp_nocheck = rfc2560.id_pkix_ocsp_nocheck
70
+ id_pkix_ocsp_nonce = rfc2560.id_pkix_ocsp_nonce
71
+ id_pkix_ocsp_response = rfc2560.id_pkix_ocsp_response
72
+ id_pkix_ocsp_service_locator = rfc2560.id_pkix_ocsp_service_locator
73
+
74
+
75
+ # Additional object identifiers
76
+
77
+ id_pkix_ocsp_pref_sig_algs = id_pkix_ocsp + (8, )
78
+ id_pkix_ocsp_extended_revoke = id_pkix_ocsp + (9, )
79
+
80
+
81
+ # Updated structures (mostly to improve openTypes support)
82
+
83
+ class CertID(univ.Sequence):
84
+ componentType = namedtype.NamedTypes(
85
+ namedtype.NamedType('hashAlgorithm', AlgorithmIdentifier()),
86
+ namedtype.NamedType('issuerNameHash', univ.OctetString()),
87
+ namedtype.NamedType('issuerKeyHash', univ.OctetString()),
88
+ namedtype.NamedType('serialNumber', CertificateSerialNumber())
89
+ )
90
+
91
+
92
+ class SingleResponse(univ.Sequence):
93
+ componentType = namedtype.NamedTypes(
94
+ namedtype.NamedType('certID', CertID()),
95
+ namedtype.NamedType('certStatus', CertStatus()),
96
+ namedtype.NamedType('thisUpdate', useful.GeneralizedTime()),
97
+ namedtype.OptionalNamedType('nextUpdate', useful.GeneralizedTime().subtype(
98
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
99
+ namedtype.OptionalNamedType('singleExtensions', Extensions().subtype(
100
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1)))
101
+ )
102
+
103
+
104
+ class ResponderID(univ.Choice):
105
+ componentType = namedtype.NamedTypes(
106
+ namedtype.NamedType('byName', Name().subtype(
107
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1))),
108
+ namedtype.NamedType('byKey', KeyHash().subtype(
109
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 2)))
110
+ )
111
+
112
+
113
+ class ResponseData(univ.Sequence):
114
+ componentType = namedtype.NamedTypes(
115
+ namedtype.DefaultedNamedType('version', Version('v1').subtype(
116
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
117
+ namedtype.NamedType('responderID', ResponderID()),
118
+ namedtype.NamedType('producedAt', useful.GeneralizedTime()),
119
+ namedtype.NamedType('responses', univ.SequenceOf(
120
+ componentType=SingleResponse())),
121
+ namedtype.OptionalNamedType('responseExtensions', Extensions().subtype(
122
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1)))
123
+ )
124
+
125
+
126
+ class BasicOCSPResponse(univ.Sequence):
127
+ componentType = namedtype.NamedTypes(
128
+ namedtype.NamedType('tbsResponseData', ResponseData()),
129
+ namedtype.NamedType('signatureAlgorithm', AlgorithmIdentifier()),
130
+ namedtype.NamedType('signature', univ.BitString()),
131
+ namedtype.OptionalNamedType('certs', univ.SequenceOf(
132
+ componentType=Certificate()).subtype(explicitTag=tag.Tag(
133
+ tag.tagClassContext, tag.tagFormatSimple, 0)))
134
+ )
135
+
136
+
137
+ class Request(univ.Sequence):
138
+ componentType = namedtype.NamedTypes(
139
+ namedtype.NamedType('reqCert', CertID()),
140
+ namedtype.OptionalNamedType('singleRequestExtensions', Extensions().subtype(
141
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0)))
142
+ )
143
+
144
+
145
+ class Signature(univ.Sequence):
146
+ componentType = namedtype.NamedTypes(
147
+ namedtype.NamedType('signatureAlgorithm', AlgorithmIdentifier()),
148
+ namedtype.NamedType('signature', univ.BitString()),
149
+ namedtype.OptionalNamedType('certs', univ.SequenceOf(
150
+ componentType=Certificate()).subtype(explicitTag=tag.Tag(
151
+ tag.tagClassContext, tag.tagFormatSimple, 0)))
152
+ )
153
+
154
+
155
+ class TBSRequest(univ.Sequence):
156
+ componentType = namedtype.NamedTypes(
157
+ namedtype.DefaultedNamedType('version', Version('v1').subtype(
158
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
159
+ namedtype.OptionalNamedType('requestorName', GeneralName().subtype(
160
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1))),
161
+ namedtype.NamedType('requestList', univ.SequenceOf(
162
+ componentType=Request())),
163
+ namedtype.OptionalNamedType('requestExtensions', Extensions().subtype(
164
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 2)))
165
+ )
166
+
167
+
168
+ class OCSPRequest(univ.Sequence):
169
+ componentType = namedtype.NamedTypes(
170
+ namedtype.NamedType('tbsRequest', TBSRequest()),
171
+ namedtype.OptionalNamedType('optionalSignature', Signature().subtype(
172
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0)))
173
+ )
174
+
175
+
176
+ # Previously omitted structure
177
+
178
+ class ServiceLocator(univ.Sequence):
179
+ componentType = namedtype.NamedTypes(
180
+ namedtype.NamedType('issuer', Name()),
181
+ namedtype.NamedType('locator', AuthorityInfoAccessSyntax())
182
+ )
183
+
184
+
185
+ # Additional structures
186
+
187
+ class CrlID(univ.Sequence):
188
+ componentType = namedtype.NamedTypes(
189
+ namedtype.OptionalNamedType('crlUrl', char.IA5String().subtype(
190
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
191
+ namedtype.OptionalNamedType('crlNum', univ.Integer().subtype(
192
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1))),
193
+ namedtype.OptionalNamedType('crlTime', useful.GeneralizedTime().subtype(
194
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 2)))
195
+ )
196
+
197
+
198
+ class PreferredSignatureAlgorithm(univ.Sequence):
199
+ componentType = namedtype.NamedTypes(
200
+ namedtype.NamedType('sigIdentifier', AlgorithmIdentifier()),
201
+ namedtype.OptionalNamedType('certIdentifier', AlgorithmIdentifier())
202
+ )
203
+
204
+
205
+ class PreferredSignatureAlgorithms(univ.SequenceOf):
206
+ componentType = PreferredSignatureAlgorithm()
207
+
208
+
209
+ class Nonce(univ.OctetString):
210
+ subtypeSpec = constraint.ValueSizeConstraint(1, 32)
211
+
212
+
213
+ # Update the OCSP Response Map
214
+
215
+ _ocspResponseMapUpdate = {
216
+ id_pkix_ocsp_basic: BasicOCSPResponse(),
217
+ }
218
+
219
+ ocspResponseMap.update(_ocspResponseMapUpdate)
220
+
221
+
222
+ # Update the Certificate Extension Extensions Map
223
+
224
+ _certificateExtensionsMapUpdate = {
225
+ # Certificate Extension
226
+ id_pkix_ocsp_nocheck: univ.Null(""),
227
+ # OCSP Request Extensions
228
+ id_pkix_ocsp_nonce: Nonce(),
229
+ id_pkix_ocsp_response: AcceptableResponses(),
230
+ id_pkix_ocsp_service_locator: ServiceLocator(),
231
+ id_pkix_ocsp_pref_sig_algs: PreferredSignatureAlgorithms(),
232
+ # OCSP Response Extensions
233
+ id_pkix_ocsp_crl: CrlID(),
234
+ id_pkix_ocsp_archive_cutoff: ArchiveCutoff(),
235
+ id_pkix_ocsp_extended_revoke: univ.Null(""),
236
+ }
237
+
238
+ certificateExtensionsMap.update(_certificateExtensionsMapUpdate)
@@ -4,7 +4,7 @@
4
4
  # Created by Russ Housley with some assistance from asn1ate v.0.6.0.
5
5
  # Modified by Russ Housley to include the opentypemap manager.
6
6
  #
7
- # Copyright (c) 2021-2022, Vigil Security, LLC
7
+ # Copyright (c) 2021-2024, Vigil Security, LLC
8
8
  # License: http://vigilsec.com/pyasn1-alt-modules-license.txt
9
9
  #
10
10
  # Autonomic Control Plane (ACP) Node Name in X.509 Certificates
@@ -4,7 +4,7 @@
4
4
  # Created by Russ Housley.
5
5
  # Modified by Russ Housley to include the opentypemap manager.
6
6
  #
7
- # Copyright (c) 2021-2022, Vigil Security, LLC
7
+ # Copyright (c) 2021-2024, Vigil Security, LLC
8
8
  # License: http://vigilsec.com/pyasn1-alt-modules-license.txt
9
9
  #
10
10
  # BRSKI MASA Certificate Extension
@@ -4,7 +4,7 @@
4
4
  # Created by Russ Housley.
5
5
  # Modified by Russ Housley to include the opentypemap manager.
6
6
  #
7
- # Copyright (c) 2021-2022, Vigil Security, LLC
7
+ # Copyright (c) 2021-2024, Vigil Security, LLC
8
8
  # License: http://vigilsec.com/pyasn1-alt-modules-license.txt
9
9
  #
10
10
  # Algorithm Identifiers for AES-GMAC
@@ -3,7 +3,7 @@
3
3
  #
4
4
  # Created by Russ Housley.
5
5
  #
6
- # Copyright (c) 2021-2022, Vigil Security, LLC
6
+ # Copyright (c) 2021-2024, Vigil Security, LLC
7
7
  # License: http://vigilsec.com/pyasn1-alt-modules-license.txt
8
8
  #
9
9
  # Digital Signatures on geofeed data
@@ -2,7 +2,7 @@
2
2
  #
3
3
  # Created by Russ Housley.
4
4
  #
5
- # Copyright (c) 2021-2022, Vigil Security, LLC
5
+ # Copyright (c) 2021-2024, Vigil Security, LLC
6
6
  # License: http://vigilsec.com/pyasn1-alt-modules-license.txt
7
7
  #
8
8
  # Enhanced JWT Claim Constraints certificate extensions
@@ -3,7 +3,7 @@
3
3
  #
4
4
  # Created by Russ Housley.
5
5
  #
6
- # Copyright (c) 2021-2022, Vigil Security, LLC
6
+ # Copyright (c) 2021-2024, Vigil Security, LLC
7
7
  # License: http://vigilsec.com/pyasn1-alt-modules-license.txt
8
8
  #
9
9
  # Delay-Tolerant Networking TCP Convergence Layer Version 4
@@ -3,7 +3,7 @@
3
3
  #
4
4
  # Created by Russ Housley.
5
5
  #
6
- # Copyright (c) 2022, Vigil Security, LLC
6
+ # Copyright (c) 2022-2024, Vigil Security, LLC
7
7
  # License: http://vigilsec.com/pyasn1-alt-modules-license.txt
8
8
  #
9
9
  # GOST Cipher Suites for TLS 1.2
@@ -2,8 +2,10 @@
2
2
  # This file is part of pyasn1-alt-modules software.
3
3
  #
4
4
  # Created by Russ Housley.
5
+ # Modified by Russ Housley to add synonyms with two digit years for
6
+ # some of the OIDs to align with the ASN.1 module in RFC 9215.
5
7
  #
6
- # Copyright (c) 2022, Vigil Security, LLC
8
+ # Copyright (c) 2022-2024, Vigil Security, LLC
7
9
  # License: http://vigilsec.com/pyasn1-alt-modules-license.txt
8
10
  #
9
11
  # GOST R 34.10-2012 and GOST R 34.11-2012 Algorithms
@@ -43,8 +45,12 @@ id_tc26_gost_3410_2012_512_constants = id_tc26_sign_constants + (2,)
43
45
 
44
46
  id_tc26_gost3410_2012_256 = id_tc26_sign + (1,)
45
47
 
48
+ id_tc26_gost3410_12_256 = id_tc26_gost3410_2012_256
49
+
46
50
  id_tc26_gost3410_2012_512 = id_tc26_sign + (2,)
47
51
 
52
+ id_tc26_gost3410_12_512 = id_tc26_gost3410_2012_512
53
+
48
54
  id_tc26_gost3411_12_256 = id_tc26_digest + (2,)
49
55
 
50
56
  id_tc26_gost3411_12_512 = id_tc26_digest + (3,)
@@ -53,8 +59,12 @@ id_tc26_signwithdigest = id_tc26 + (1, 3)
53
59
 
54
60
  id_tc26_signwithdigest_gost3410_2012_256 = id_tc26_signwithdigest + (2,)
55
61
 
62
+ id_tc26_signwithdigest_gost3410_12_256 = id_tc26_signwithdigest_gost3410_2012_256
63
+
56
64
  id_tc26_signwithdigest_gost3410_2012_512 = id_tc26_signwithdigest + (3,)
57
65
 
66
+ id_tc26_signwithdigest_gost3410_12_512 = id_tc26_signwithdigest_gost3410_2012_512
67
+
58
68
  id_tc26_gost_3410_2012_256_paramSetA = id_tc26_gost_3410_2012_256_constants + (1,)
59
69
 
60
70
  id_tc26_gost_3410_2012_256_paramSetB = id_tc26_gost_3410_2012_256_constants + (2,)
@@ -5,7 +5,7 @@
5
5
  # constraint to the file name. Note that RFC 9286 obsoletes RFC 6486.
6
6
  # Modified by Russ Housley to apply eid7118.
7
7
  #
8
- # Copyright (c) 2022, Vigil Security, LLC
8
+ # Copyright (c) 2022-2024, Vigil Security, LLC
9
9
  # License: http://vigilsec.com/pyasn1-alt-modules-license.txt
10
10
  #
11
11
  # RPKI Manifests
@@ -3,7 +3,7 @@
3
3
  #
4
4
  # Created by Russ Housley.
5
5
  #
6
- # Copyright (c) 2022, Vigil Security, LLC
6
+ # Copyright (c) 2022-2024, Vigil Security, LLC
7
7
  # License: http://vigilsec.com/pyasn1-alt-modules-license.txt
8
8
  #
9
9
  # Extended Key Usage values for RPC over TLS
@@ -3,7 +3,7 @@
3
3
  #
4
4
  # Created by Russ Housley.
5
5
  #
6
- # Copyright (c) 2022, Vigil Security, LLC
6
+ # Copyright (c) 2022-2024, Vigil Security, LLC
7
7
  # License: http://vigilsec.com/pyasn1-alt-modules-license.txt
8
8
  #
9
9
  # Certificate Extension for 5G Network Function Types
@@ -3,7 +3,7 @@
3
3
  #
4
4
  # Created by Russ Housley with assistance from asn1ate v.0.6.0.
5
5
  #
6
- # Copyright (c) 2022, Vigil Security, LLC
6
+ # Copyright (c) 2022-2024, Vigil Security, LLC
7
7
  # License: http://vigilsec.com/pyasn1-alt-modules-license.txt
8
8
  #
9
9
  # RPKI Signed Checklist (RSC)
@@ -3,7 +3,7 @@
3
3
  #
4
4
  # Created by Russ Housley.
5
5
  #
6
- # Copyright (c) 2022, Vigil Security, LLC
6
+ # Copyright (c) 2022-2024, Vigil Security, LLC
7
7
  # License: http://vigilsec.com/pyasn1-alt-modules-license.txt
8
8
  #
9
9
  # Extended Key Usage (EKU) for Document Signing in X.509 Certificates
@@ -3,7 +3,7 @@
3
3
  #
4
4
  # Created by Russ Housley.
5
5
  #
6
- # Copyright (c) 2022, Vigil Security, LLC
6
+ # Copyright (c) 2022-2024, Vigil Security, LLC
7
7
  # License: http://vigilsec.com/pyasn1-alt-modules-license.txt
8
8
  #
9
9
  # GOST Algorithms with PKCS#5
@@ -0,0 +1,36 @@
1
+ # This file is part of pyasn1-alt-modules software.
2
+ #
3
+ # Created by Russ Housley.
4
+ #
5
+ # Copyright (c) 2023-2024, Vigil Security, LLC
6
+ # License: http://vigilsec.com/pyasn1-alt-modules-license.txt
7
+ #
8
+ # Delegated Credentials for TLS and DTLS
9
+ #
10
+ # ASN.1 source from:
11
+ # https://www.rfc-editor.org/rfc/rfc9345.txt
12
+
13
+ from pyasn1.type import univ
14
+ from pyasn1_alt_modules import opentypemap
15
+
16
+ certificateExtensionsMap = opentypemap.get('certificateExtensionsMap')
17
+
18
+
19
+ # DelegatedCredentialExtn
20
+
21
+ class DelegationUsage(univ.Null):
22
+ pass
23
+
24
+
25
+ id_cloudflare = univ.ObjectIdentifier((1, 3, 6, 1, 4, 1, 44363,))
26
+
27
+ id_pe_delegationUsage = id_cloudflare + (44,)
28
+
29
+
30
+ # Update the Certificate Extension Map
31
+
32
+ _certificateExtensionsMapUpdate = {
33
+ id_pe_delegationUsage: DelegationUsage(),
34
+ }
35
+
36
+ certificateExtensionsMap.update(_certificateExtensionsMapUpdate)
@@ -0,0 +1,22 @@
1
+ #
2
+ # This file is part of pyasn1-alt-modules software.
3
+ #
4
+ # Created by Russ Housley.
5
+ #
6
+ # Copyright (c) 2023-2024, Vigil Security, LLC
7
+ # License: http://vigilsec.com/pyasn1-alt-modules-license.txt
8
+ #
9
+ # GOST R 34.10-2012 Algorithm for IKEv2
10
+ #
11
+ # ASN.1 source from:
12
+ # https://www.rfc-editor.org/rfc/rfc9385.txt
13
+ #
14
+
15
+ from pyasn1_alt_modules import rfc9215
16
+
17
+
18
+ # Imports from RFC 9215
19
+
20
+ id_tc26_signwithdigest_gost3410_12_256 = rfc9215.id_tc26_signwithdigest_gost3410_2012_256
21
+
22
+ id_tc26_signwithdigest_gost3410_12_512 = rfc9215.id_tc26_signwithdigest_gost3410_2012_512
@@ -0,0 +1,59 @@
1
+ #
2
+ # This file is part of pyasn1-alt-modules software.
3
+ #
4
+ # Created by Russ Housley from rfc3709.py and rfc6710.py.
5
+ #
6
+ # Copyright (c) 2023-2024, Vigil Security, LLC
7
+ # License: http://vigilsec.com/pyasn1-alt-modules-license.txt
8
+ #
9
+ # Logotypes in X.509 Certificates
10
+ #
11
+ # ASN.1 source from:
12
+ # https://www.rfc-editor.org/rfc/rfc9399.txt
13
+ #
14
+
15
+ from pyasn1_alt_modules import rfc3709
16
+ from pyasn1_alt_modules import rfc6170
17
+
18
+
19
+ # Types defined in RFC 3709
20
+
21
+ HashAlgAndValue = rfc3709.HashAlgAndValue
22
+
23
+ LogotypeDetails = rfc3709.LogotypeDetails
24
+
25
+ LogotypeAudioInfo = rfc3709.LogotypeAudioInfo
26
+
27
+ LogotypeAudio = rfc3709.LogotypeAudio
28
+
29
+ LogotypeImageType = rfc3709.LogotypeImageType
30
+
31
+ LogotypeImageResolution = rfc3709.LogotypeImageResolution
32
+
33
+ LogotypeImageInfo = rfc3709.LogotypeImageInfo
34
+
35
+ LogotypeImage = rfc3709.LogotypeImage
36
+
37
+ LogotypeData = rfc3709.LogotypeData
38
+
39
+ LogotypeReference = rfc3709.LogotypeReference
40
+
41
+ LogotypeInfo = rfc3709.LogotypeInfo
42
+
43
+ OtherLogotypeInfo = rfc3709.OtherLogotypeInfo
44
+
45
+ LogotypeExtn = rfc3709.LogotypeExtn
46
+
47
+
48
+ # Object identifiers from RFC 3709 and RFC 6170
49
+
50
+ id_pe_logotype = rfc3709.id_pe_logotype
51
+
52
+ id_logo_background = rfc3709.id_logo_background
53
+
54
+ id_logo_loyalty = rfc3709.id_logo_loyalty
55
+
56
+ id_logo_certImage = rfc6170.id_logo_certImage
57
+
58
+
59
+ # The Certificate Extensions Map is updated by importing rfc3709