pyasn1-alt-modules 0.4.1__py2.py3-none-any.whl → 0.4.3__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 (190) 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 +72 -0
  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 +159 -0
  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 +3 -2
  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/rfc8994.py +1 -1
  163. pyasn1_alt_modules/rfc8995.py +1 -1
  164. pyasn1_alt_modules/rfc9044.py +1 -1
  165. pyasn1_alt_modules/rfc9092.py +1 -1
  166. pyasn1_alt_modules/rfc9118.py +1 -1
  167. pyasn1_alt_modules/rfc9174.py +1 -1
  168. pyasn1_alt_modules/rfc9189.py +1 -1
  169. pyasn1_alt_modules/rfc9215.py +228 -0
  170. pyasn1_alt_modules/rfc9286.py +78 -0
  171. pyasn1_alt_modules/rfc9289.py +22 -0
  172. pyasn1_alt_modules/rfc9310.py +46 -0
  173. pyasn1_alt_modules/rfc9323.py +129 -0
  174. pyasn1_alt_modules/rfc9336.py +20 -0
  175. pyasn1_alt_modules/rfc9337.py +74 -0
  176. pyasn1_alt_modules/rfc9345.py +36 -0
  177. pyasn1_alt_modules/rfc9385.py +22 -0
  178. pyasn1_alt_modules/rfc9399.py +59 -0
  179. pyasn1_alt_modules/rfc9480.py +716 -0
  180. pyasn1_alt_modules/rfc9481.py +224 -0
  181. pyasn1_alt_modules/rfc9509.py +24 -0
  182. {pyasn1_alt_modules-0.4.1.dist-info → pyasn1_alt_modules-0.4.3.dist-info}/LICENSE.txt +1 -1
  183. {pyasn1_alt_modules-0.4.1.dist-info → pyasn1_alt_modules-0.4.3.dist-info}/METADATA +5 -5
  184. pyasn1_alt_modules-0.4.3.dist-info/RECORD +187 -0
  185. {pyasn1_alt_modules-0.4.1.dist-info → pyasn1_alt_modules-0.4.3.dist-info}/WHEEL +1 -1
  186. pyasn1_alt_modules/addon.py +0 -284
  187. pyasn1_alt_modules/rfc5794.py +0 -391
  188. pyasn1_alt_modules-0.4.1.dist-info/RECORD +0 -172
  189. {pyasn1_alt_modules-0.4.1.dist-info → pyasn1_alt_modules-0.4.3.dist-info}/top_level.txt +0 -0
  190. {pyasn1_alt_modules-0.4.1.dist-info → pyasn1_alt_modules-0.4.3.dist-info}/zip-safe +0 -0
@@ -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
@@ -0,0 +1,228 @@
1
+ #
2
+ # This file is part of pyasn1-alt-modules software.
3
+ #
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.
7
+ #
8
+ # Copyright (c) 2022-2024, Vigil Security, LLC
9
+ # License: http://vigilsec.com/pyasn1-alt-modules-license.txt
10
+ #
11
+ # GOST R 34.10-2012 and GOST R 34.11-2012 Algorithms
12
+ #
13
+ # ASN.1 source from:
14
+ # https://www.rfc-editor.org/rfc/rfc9215.txt
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 univ
22
+
23
+ from pyasn1_alt_modules import opentypemap
24
+
25
+ algorithmIdentifierMap = opentypemap.get('algorithmIdentifierMap')
26
+
27
+ certificateAttributesMap = opentypemap.get('certificateAttributesMap')
28
+
29
+ certificateExtensionsMap = opentypemap.get('certificateExtensionsMap')
30
+
31
+
32
+ # MODULE: GostR3410-2012-PKISyntax { 1 2 643 7 1 0 2 }
33
+
34
+ id_tc26 = univ.ObjectIdentifier((1, 2, 643, 7, 1))
35
+
36
+ id_tc26_sign = id_tc26 + (1, 1)
37
+
38
+ id_tc26_digest = id_tc26 + (1, 2)
39
+
40
+ id_tc26_sign_constants = id_tc26 + (2, 1)
41
+
42
+ id_tc26_gost_3410_2012_256_constants = id_tc26_sign_constants + (1,)
43
+
44
+ id_tc26_gost_3410_2012_512_constants = id_tc26_sign_constants + (2,)
45
+
46
+ id_tc26_gost3410_2012_256 = id_tc26_sign + (1,)
47
+
48
+ id_tc26_gost3410_12_256 = id_tc26_gost3410_2012_256
49
+
50
+ id_tc26_gost3410_2012_512 = id_tc26_sign + (2,)
51
+
52
+ id_tc26_gost3410_12_512 = id_tc26_gost3410_2012_512
53
+
54
+ id_tc26_gost3411_12_256 = id_tc26_digest + (2,)
55
+
56
+ id_tc26_gost3411_12_512 = id_tc26_digest + (3,)
57
+
58
+ id_tc26_signwithdigest = id_tc26 + (1, 3)
59
+
60
+ id_tc26_signwithdigest_gost3410_2012_256 = id_tc26_signwithdigest + (2,)
61
+
62
+ id_tc26_signwithdigest_gost3410_12_256 = id_tc26_signwithdigest_gost3410_2012_256
63
+
64
+ id_tc26_signwithdigest_gost3410_2012_512 = id_tc26_signwithdigest + (3,)
65
+
66
+ id_tc26_signwithdigest_gost3410_12_512 = id_tc26_signwithdigest_gost3410_2012_512
67
+
68
+ id_tc26_gost_3410_2012_256_paramSetA = id_tc26_gost_3410_2012_256_constants + (1,)
69
+
70
+ id_tc26_gost_3410_2012_256_paramSetB = id_tc26_gost_3410_2012_256_constants + (2,)
71
+
72
+ id_tc26_gost_3410_2012_256_paramSetC = id_tc26_gost_3410_2012_256_constants + (3,)
73
+
74
+ id_tc26_gost_3410_2012_256_paramSetD = id_tc26_gost_3410_2012_256_constants + (4,)
75
+
76
+ id_tc26_gost_3410_2012_512_paramSetTest = id_tc26_gost_3410_2012_512_constants + (0,)
77
+
78
+ id_tc26_gost_3410_2012_512_paramSetA = id_tc26_gost_3410_2012_512_constants + (1,)
79
+
80
+ id_tc26_gost_3410_2012_512_paramSetB = id_tc26_gost_3410_2012_512_constants + (2,)
81
+
82
+ id_tc26_gost_3410_2012_512_paramSetC = id_tc26_gost_3410_2012_512_constants + (3,)
83
+
84
+
85
+ class GostR3410_2012_256_PublicKey(univ.OctetString):
86
+ subtypeSpec = constraint.ValueSizeConstraint(64, 64)
87
+
88
+
89
+ class GostR3410_2012_512_PublicKey(univ.OctetString):
90
+ subtypeSpec = constraint.ValueSizeConstraint(128, 128)
91
+
92
+
93
+ class GostR3410_2012_PublicKey(univ.OctetString):
94
+ subtypeSpec = constraint.ConstraintsUnion(
95
+ constraint.ValueSizeConstraint(64, 64),
96
+ constraint.ValueSizeConstraint(128, 128)
97
+ )
98
+
99
+
100
+ class GostR3410_2012_PublicKeyParameters(univ.Sequence):
101
+ componentType = namedtype.NamedTypes(
102
+ namedtype.NamedType('publicKeyParamSet', univ.ObjectIdentifier()),
103
+ namedtype.OptionalNamedType('digestParamSet', univ.ObjectIdentifier())
104
+ )
105
+
106
+
107
+ # MODULE: RuStrongCertsSyntax { 1 2 643 7 1 0 6 }
108
+
109
+ id_ca = univ.ObjectIdentifier((1, 2, 643, 3))
110
+
111
+ id_fss = univ.ObjectIdentifier((1, 2, 643, 100))
112
+
113
+ id_fns = id_ca + (131,)
114
+
115
+
116
+ class OGRN(char.NumericString):
117
+ subtypeSpec = constraint.ValueSizeConstraint(13, 13)
118
+
119
+ id_OGRN = id_fss + (1,)
120
+
121
+
122
+ class SNILS(char.NumericString):
123
+ subtypeSpec = constraint.ValueSizeConstraint(11, 11)
124
+
125
+ id_SNILS = id_fss + (3,)
126
+
127
+
128
+ class OGRNIP(char.NumericString):
129
+ subtypeSpec = constraint.ValueSizeConstraint(15, 15)
130
+
131
+ id_OGRNIP = id_fss + (5,)
132
+
133
+
134
+ id_class = id_fss + (113,)
135
+
136
+ id_class_kc1 = id_class + (1,)
137
+
138
+ id_class_kc2 = id_class + (2,)
139
+
140
+ id_class_kc3 = id_class + (3,)
141
+
142
+ id_class_kb1 = id_class + (4,)
143
+
144
+ id_class_kb2 = id_class + (5,)
145
+
146
+ id_class_ka = id_class + (6,)
147
+
148
+
149
+ class INN(char.NumericString):
150
+ subtypeSpec = constraint.ValueSizeConstraint(12, 12)
151
+
152
+ id_INN = id_fns + (1, 1)
153
+
154
+
155
+ class INNLE(char.NumericString):
156
+ subtypeSpec = constraint.ValueSizeConstraint(10, 10)
157
+
158
+ id_INNLE = id_fss + (4,)
159
+
160
+
161
+ class SubjectSignTool(char.UTF8String):
162
+ subtypeSpec = constraint.ValueSizeConstraint(1, 200)
163
+
164
+ id_SubjectSignTool = id_fss + (111,)
165
+
166
+
167
+ class IssuerSignTool(univ.Sequence):
168
+ componentType = namedtype.NamedTypes(
169
+ namedtype.NamedType('signTool',
170
+ char.UTF8String().subtype(
171
+ subtypeSpec=constraint.ValueSizeConstraint(1, 200))),
172
+ namedtype.NamedType('cATool',
173
+ char.UTF8String().subtype(
174
+ subtypeSpec=constraint.ValueSizeConstraint(1, 200))),
175
+ namedtype.NamedType('signToolCert',
176
+ char.UTF8String().subtype(
177
+ subtypeSpec=constraint.ValueSizeConstraint(1, 100))),
178
+ namedtype.NamedType('cAToolCert',
179
+ char.UTF8String().subtype(
180
+ subtypeSpec=constraint.ValueSizeConstraint(1, 100)))
181
+ )
182
+
183
+ id_IssuerSignTool = id_fss + (112,)
184
+
185
+
186
+ class IdentificationKind(univ.Integer):
187
+ namedValues = namedval.NamedValues(
188
+ ('personal', 0),
189
+ ('remote_cert', 1),
190
+ ('remote_passport', 2),
191
+ ('remote_system', 3)
192
+ )
193
+
194
+ id_IdentificationKind = id_fss + (114,)
195
+
196
+
197
+ # Update the Algorithm Identifier Map
198
+
199
+ _algorithmIdentifierMapUpdate = {
200
+ id_tc26_gost3410_2012_256: GostR3410_2012_PublicKeyParameters(),
201
+ id_tc26_gost3410_2012_512: GostR3410_2012_PublicKeyParameters(),
202
+ }
203
+
204
+ algorithmIdentifierMap.update(_algorithmIdentifierMapUpdate)
205
+
206
+
207
+ # Update the Certificate Attribute Map
208
+
209
+ _certificateAttributesMapUpdate = {
210
+ id_INN: INN(),
211
+ id_INNLE: INNLE(),
212
+ id_OGRN: OGRN(),
213
+ id_OGRNIP: OGRNIP(),
214
+ id_SNILS: SNILS(),
215
+ id_IdentificationKind: IdentificationKind()
216
+ }
217
+
218
+ certificateAttributesMap.update(_certificateAttributesMapUpdate)
219
+
220
+
221
+ # Update the Certificate Extension Map
222
+
223
+ _certificateExtensionsMap = {
224
+ id_SubjectSignTool: SubjectSignTool(),
225
+ id_IssuerSignTool: IssuerSignTool(),
226
+ }
227
+
228
+ certificateExtensionsMap.update(_certificateExtensionsMap)
@@ -0,0 +1,78 @@
1
+ #
2
+ # This file is part of pyasn1-alt-modules software.
3
+ #
4
+ # Created by Russ Housley from rfc6486.py, adding the permitted alphabet
5
+ # constraint to the file name. Note that RFC 9286 obsoletes RFC 6486.
6
+ # Modified by Russ Housley to apply eid7118.
7
+ #
8
+ # Copyright (c) 2022-2024, Vigil Security, LLC
9
+ # License: http://vigilsec.com/pyasn1-alt-modules-license.txt
10
+ #
11
+ # RPKI Manifests
12
+ #
13
+ # ASN.1 source from:
14
+ # https://www.rfc-editor.org/rfc/rfc9286.txt
15
+ # https://www.rfc-editor.org/errata/eid7118
16
+ #
17
+
18
+ from pyasn1.type import char
19
+ from pyasn1.type import constraint
20
+ from pyasn1.type import namedtype
21
+ from pyasn1.type import tag
22
+ from pyasn1.type import useful
23
+ from pyasn1.type import univ
24
+
25
+ from pyasn1_alt_modules import opentypemap
26
+
27
+ cmsContentTypesMap = opentypemap.get('cmsContentTypesMap')
28
+
29
+ MAX = float('inf')
30
+
31
+
32
+ id_smime = univ.ObjectIdentifier('1.2.840.113549.1.9.16')
33
+
34
+ id_ct = id_smime + (1, )
35
+
36
+ id_ct_rpkiManifest = id_ct + (26, )
37
+
38
+
39
+ class FileAndHash(univ.Sequence):
40
+ componentType = namedtype.NamedTypes(
41
+ namedtype.NamedType('file', char.IA5String().subtype(subtypeSpec=
42
+ constraint.PermittedAlphabetConstraint('a', 'b', 'c', 'd', 'e',
43
+ 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q',
44
+ 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C',
45
+ 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
46
+ 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0',
47
+ '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', '_', '.'))),
48
+ namedtype.NamedType('hash', univ.BitString())
49
+ )
50
+
51
+
52
+ class Manifest(univ.Sequence):
53
+ componentType = namedtype.NamedTypes(
54
+ namedtype.DefaultedNamedType('version',
55
+ univ.Integer().subtype(explicitTag=tag.Tag(
56
+ tag.tagClassContext, tag.tagFormatSimple, 0)).subtype(value=0)),
57
+ namedtype.NamedType('manifestNumber',
58
+ univ.Integer().subtype(
59
+ subtypeSpec=constraint.ValueRangeConstraint(0, MAX))),
60
+ namedtype.NamedType('thisUpdate',
61
+ useful.GeneralizedTime()),
62
+ namedtype.NamedType('nextUpdate',
63
+ useful.GeneralizedTime()),
64
+ namedtype.NamedType('fileHashAlg',
65
+ univ.ObjectIdentifier()),
66
+ namedtype.NamedType('fileList',
67
+ univ.SequenceOf(componentType=FileAndHash()).subtype(
68
+ subtypeSpec=constraint.ValueSizeConstraint(1, MAX)))
69
+ )
70
+
71
+
72
+ # Update the CMS Content Types Map
73
+
74
+ _cmsContentTypesMapUpdate = {
75
+ id_ct_rpkiManifest: Manifest(),
76
+ }
77
+
78
+ cmsContentTypesMap.update(_cmsContentTypesMapUpdate)
@@ -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) 2022-2024, Vigil Security, LLC
7
+ # License: http://vigilsec.com/pyasn1-alt-modules-license.txt
8
+ #
9
+ # Extended Key Usage values for RPC over TLS
10
+ #
11
+ # ASN.1 source from:
12
+ # https://www.rfc-editor.org/rfc/rfc9289.txt
13
+ #
14
+
15
+ from pyasn1.type import univ
16
+
17
+
18
+ id_kp = univ.ObjectIdentifier('1.3.6.1.5.5.7.3')
19
+
20
+ id_kp_rpcTLSClient = id_kp + (33,)
21
+
22
+ id_kp_rpcTLSServer = id_kp + (34,)
@@ -0,0 +1,46 @@
1
+ #
2
+ # This file is part of pyasn1-alt-modules software.
3
+ #
4
+ # Created by Russ Housley.
5
+ #
6
+ # Copyright (c) 2022-2024, Vigil Security, LLC
7
+ # License: http://vigilsec.com/pyasn1-alt-modules-license.txt
8
+ #
9
+ # Certificate Extension for 5G Network Function Types
10
+ #
11
+ # ASN.1 source from:
12
+ # https://www.rfc-editor.org/rfc/rfc9310.txt
13
+ #
14
+
15
+ from pyasn1.type import char
16
+ from pyasn1.type import constraint
17
+ from pyasn1.type import univ
18
+
19
+ from pyasn1_alt_modules import opentypemap
20
+
21
+ certificateExtensionsMap = opentypemap.get('certificateExtensionsMap')
22
+
23
+ MAX = float('inf')
24
+
25
+
26
+ # NFTypes Certificate Extension
27
+
28
+ class NFType(char.IA5String):
29
+ subtypeSpec = constraint.ValueSizeConstraint(1, 32)
30
+
31
+
32
+ class NFTypes(univ.SequenceOf):
33
+ componentType = NFType()
34
+ subtypeSpec = constraint.ValueSizeConstraint(1, MAX)
35
+
36
+
37
+ id_pe_nftype = univ.ObjectIdentifier((1, 3, 6, 1, 5, 5, 7, 1, 34))
38
+
39
+
40
+ # Add to the map of Certificate Extensions
41
+
42
+ _certificateExtensionsMap = {
43
+ id_pe_nftype: NFTypes(),
44
+ }
45
+
46
+ certificateExtensionsMap.update(_certificateExtensionsMap)
@@ -0,0 +1,129 @@
1
+ #
2
+ # This file is part of pyasn1-alt-modules software.
3
+ #
4
+ # Created by Russ Housley with assistance from asn1ate v.0.6.0.
5
+ #
6
+ # Copyright (c) 2022-2024, Vigil Security, LLC
7
+ # License: http://vigilsec.com/pyasn1-alt-modules-license.txt
8
+ #
9
+ # RPKI Signed Checklist (RSC)
10
+ #
11
+ # ASN.1 source from:
12
+ # https://www.rfc-editor.org/rfc/rfc9323.txt
13
+ #
14
+
15
+ from pyasn1.type import char
16
+ from pyasn1.type import constraint
17
+ from pyasn1.type import namedtype
18
+ from pyasn1.type import namedval
19
+ from pyasn1.type import tag
20
+ from pyasn1.type import univ
21
+
22
+ from pyasn1_alt_modules import rfc5652
23
+ from pyasn1_alt_modules import rfc3779
24
+ from pyasn1_alt_modules import opentypemap
25
+
26
+ cmsContentTypesMap = opentypemap.get('cmsContentTypesMap')
27
+
28
+ MAX = float('inf')
29
+
30
+
31
+ # Imports from RFC 3779
32
+
33
+ ASIdOrRange = rfc3779.ASIdOrRange
34
+
35
+ IPAddressOrRange = rfc3779.IPAddressOrRange
36
+
37
+
38
+ # Imports from RFC 5652
39
+
40
+ Digest = rfc5652.Digest
41
+
42
+ DigestAlgorithmIdentifier = rfc5652.DigestAlgorithmIdentifier
43
+
44
+
45
+ # The RPKI Signed Checklist Content Type
46
+
47
+ id_ct_signedChecklist = univ.ObjectIdentifier('1.2.840.113549.1.9.16.1.48')
48
+
49
+
50
+ class ConstrainedIPAddressFamily(univ.Sequence):
51
+ componentType = namedtype.NamedTypes(
52
+ namedtype.NamedType('addressFamily', univ.OctetString().subtype(
53
+ subtypeSpec=constraint.ValueSizeConstraint(2, 2))),
54
+ namedtype.NamedType('ipAddressChoice', univ.SequenceOf(
55
+ componentType=IPAddressOrRange()).subtype(
56
+ subtypeSpec=constraint.ValueSizeConstraint(1, MAX)))
57
+ )
58
+
59
+
60
+ class ConstrainedASIdentifiers(univ.Sequence):
61
+ componentType = namedtype.NamedTypes(
62
+ namedtype.NamedType('asnum', univ.SequenceOf(
63
+ componentType=ASIdOrRange()).subtype(
64
+ subtypeSpec=constraint.ValueSizeConstraint(1, MAX)).subtype(
65
+ explicitTag=tag.Tag(tag.tagClassContext,
66
+ tag.tagFormatSimple, 0)))
67
+ )
68
+
69
+
70
+ class ConstrainedIPAddrBlocks(univ.SequenceOf):
71
+ componentType = ConstrainedIPAddressFamily()
72
+ subtypeSpec = constraint.ValueSizeConstraint(1, MAX)
73
+
74
+
75
+ class ResourceBlock(univ.Sequence):
76
+ componentType = namedtype.NamedTypes(
77
+ namedtype.OptionalNamedType('asID',
78
+ ConstrainedASIdentifiers().subtype(explicitTag=tag.Tag(
79
+ tag.tagClassContext, tag.tagFormatSimple, 0))),
80
+ namedtype.OptionalNamedType('ipAddrBlocks',
81
+ ConstrainedIPAddrBlocks().subtype(explicitTag=tag.Tag(
82
+ tag.tagClassContext, tag.tagFormatSimple, 1)))
83
+ )
84
+ subtypeSpec = constraint.ConstraintsUnion(
85
+ constraint.WithComponentsConstraint(
86
+ ('asID', constraint.ComponentPresentConstraint())),
87
+ constraint.WithComponentsConstraint(
88
+ ('ipAddrBlocks', constraint.ComponentPresentConstraint()))
89
+ )
90
+
91
+
92
+ class PortableFilename(char.IA5String):
93
+ subtypeSpec = constraint.PermittedAlphabetConstraint(
94
+ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',
95
+ 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x',
96
+ 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',
97
+ 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V',
98
+ 'W', 'X', 'Y', 'Z', '0', '1', '2', '3', '4', '5', '6', '7',
99
+ '8', '9', '.', '-', '_'
100
+ )
101
+
102
+
103
+ class FileNameAndHash(univ.Sequence):
104
+ componentType = namedtype.NamedTypes(
105
+ namedtype.OptionalNamedType('fileName', PortableFilename()),
106
+ namedtype.NamedType('hash', Digest())
107
+ )
108
+
109
+
110
+ class RpkiSignedChecklist(univ.Sequence):
111
+ componentType = namedtype.NamedTypes(
112
+ namedtype.DefaultedNamedType('version', univ.Integer().subtype(
113
+ explicitTag=tag.Tag(tag.tagClassContext,
114
+ tag.tagFormatSimple, 0)).subtype(value=0)),
115
+ namedtype.NamedType('resources', ResourceBlock()),
116
+ namedtype.NamedType('digestAlgorithm', DigestAlgorithmIdentifier()),
117
+ namedtype.NamedType('checkList', univ.SequenceOf(
118
+ componentType=FileNameAndHash()).subtype(
119
+ subtypeSpec=constraint.ValueSizeConstraint(1, MAX)))
120
+ )
121
+
122
+
123
+ # Update the CMS Content Type Map
124
+
125
+ _cmsContentTypesMapUpdate = {
126
+ id_ct_signedChecklist: RpkiSignedChecklist(),
127
+ }
128
+
129
+ cmsContentTypesMap.update(_cmsContentTypesMapUpdate)
@@ -0,0 +1,20 @@
1
+ #
2
+ # This file is part of pyasn1-alt-modules software.
3
+ #
4
+ # Created by Russ Housley.
5
+ #
6
+ # Copyright (c) 2022-2024, Vigil Security, LLC
7
+ # License: http://vigilsec.com/pyasn1-alt-modules-license.txt
8
+ #
9
+ # Extended Key Usage (EKU) for Document Signing in X.509 Certificates
10
+ #
11
+ # ASN.1 source from:
12
+ # https://www.rfc-editor.org/rfc/rfc9336.txt
13
+ #
14
+
15
+ from pyasn1.type import univ
16
+
17
+
18
+ id_kp = univ.ObjectIdentifier('1.3.6.1.5.5.7.3')
19
+
20
+ id_kp_documentSigning = id_kp + (36,)
@@ -0,0 +1,74 @@
1
+ #
2
+ # This file is part of pyasn1-alt-modules software.
3
+ #
4
+ # Created by Russ Housley.
5
+ #
6
+ # Copyright (c) 2022-2024, Vigil Security, LLC
7
+ # License: http://vigilsec.com/pyasn1-alt-modules-license.txt
8
+ #
9
+ # GOST Algorithms with PKCS#5
10
+ #
11
+ # ASN.1 source from:
12
+ # https://www.rfc-editor.org/rfc/rfc9337.txt
13
+ #
14
+
15
+ from pyasn1.type import namedtype
16
+ from pyasn1.type import univ
17
+
18
+ from pyasn1_alt_modules import opentypemap
19
+
20
+ algorithmIdentifierMap = opentypemap.get('algorithmIdentifierMap')
21
+
22
+
23
+ # Object Identifiers
24
+
25
+ id_tc26 = univ.ObjectIdentifier((1, 2, 643, 7, 1))
26
+
27
+ id_tc26_algorithms = id_tc26 + (1,)
28
+
29
+ id_tc26_mac = id_tc26_algorithms + (4,)
30
+
31
+ id_tc26_hmac_gost3411_12_512 = id_tc26_mac + (2,)
32
+
33
+ id_tc26_cipher = id_tc26_algorithms + (5,)
34
+
35
+ id_tc26_cipher_gostr3412_2015_magma = id_tc26_cipher + (1,)
36
+
37
+ id_tc26_cipher_gostr3412_2015_magma_ctracpkm = \
38
+ id_tc26_cipher_gostr3412_2015_magma + (1,)
39
+
40
+ id_tc26_cipher_gostr3412_2015_magma_ctracpkm_omac = \
41
+ id_tc26_cipher_gostr3412_2015_magma + (2,)
42
+
43
+ id_tc26_cipher_gostr3412_2015_kuznyechik = id_tc26_cipher + (2,)
44
+
45
+ id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm = \
46
+ id_tc26_cipher_gostr3412_2015_kuznyechik + (1,)
47
+
48
+ id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm_omac = \
49
+ id_tc26_cipher_gostr3412_2015_kuznyechik + (2,)
50
+
51
+
52
+ # Parameters
53
+
54
+ class Gost3412_15_Encryption_Parameters(univ.Sequence):
55
+ componentType = namedtype.NamedTypes(
56
+ namedtype.NamedType('ukm', univ.OctetString())
57
+ )
58
+
59
+
60
+ # Update the algorithm identifiers map
61
+
62
+ _algorithmIdentifierMapUpdate = {
63
+ id_tc26_hmac_gost3411_12_512: univ.Null(),
64
+ id_tc26_cipher_gostr3412_2015_magma_ctracpkm: \
65
+ Gost3412_15_Encryption_Parameters(),
66
+ id_tc26_cipher_gostr3412_2015_magma_ctracpkm_omac: \
67
+ Gost3412_15_Encryption_Parameters(),
68
+ id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm: \
69
+ Gost3412_15_Encryption_Parameters(),
70
+ id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm_omac: \
71
+ Gost3412_15_Encryption_Parameters(),
72
+ }
73
+
74
+ algorithmIdentifierMap.update(_algorithmIdentifierMapUpdate)
@@ -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)