pyasn1-alt-modules 0.4.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pyasn1-alt-modules might be problematic. Click here for more details.
- pyasn1_alt_modules/__init__.py +2 -0
- pyasn1_alt_modules/opentypemap.py +19 -0
- pyasn1_alt_modules/pem.py +66 -0
- pyasn1_alt_modules/rfc1155.py +97 -0
- pyasn1_alt_modules/rfc1157.py +127 -0
- pyasn1_alt_modules/rfc1901.py +23 -0
- pyasn1_alt_modules/rfc1902.py +130 -0
- pyasn1_alt_modules/rfc1905.py +136 -0
- pyasn1_alt_modules/rfc2040.py +50 -0
- pyasn1_alt_modules/rfc2251.py +564 -0
- pyasn1_alt_modules/rfc2314.py +68 -0
- pyasn1_alt_modules/rfc2315.py +325 -0
- pyasn1_alt_modules/rfc2437.py +70 -0
- pyasn1_alt_modules/rfc2459.py +1340 -0
- pyasn1_alt_modules/rfc2511.py +303 -0
- pyasn1_alt_modules/rfc2528.py +34 -0
- pyasn1_alt_modules/rfc2560.py +226 -0
- pyasn1_alt_modules/rfc2631.py +37 -0
- pyasn1_alt_modules/rfc2634.py +342 -0
- pyasn1_alt_modules/rfc2743.py +60 -0
- pyasn1_alt_modules/rfc2876.py +61 -0
- pyasn1_alt_modules/rfc2898.py +72 -0
- pyasn1_alt_modules/rfc2985.py +593 -0
- pyasn1_alt_modules/rfc2986.py +76 -0
- pyasn1_alt_modules/rfc3058.py +48 -0
- pyasn1_alt_modules/rfc3114.py +80 -0
- pyasn1_alt_modules/rfc3125.py +469 -0
- pyasn1_alt_modules/rfc3161.py +142 -0
- pyasn1_alt_modules/rfc3217.py +42 -0
- pyasn1_alt_modules/rfc3274.py +62 -0
- pyasn1_alt_modules/rfc3279.py +264 -0
- pyasn1_alt_modules/rfc3280.py +1544 -0
- pyasn1_alt_modules/rfc3281.py +332 -0
- pyasn1_alt_modules/rfc3370.py +142 -0
- pyasn1_alt_modules/rfc3412.py +54 -0
- pyasn1_alt_modules/rfc3414.py +29 -0
- pyasn1_alt_modules/rfc3447.py +46 -0
- pyasn1_alt_modules/rfc3537.py +44 -0
- pyasn1_alt_modules/rfc3546.py +23 -0
- pyasn1_alt_modules/rfc3560.py +74 -0
- pyasn1_alt_modules/rfc3565.py +59 -0
- pyasn1_alt_modules/rfc3657.py +69 -0
- pyasn1_alt_modules/rfc3709.py +230 -0
- pyasn1_alt_modules/rfc3739.py +207 -0
- pyasn1_alt_modules/rfc3770.py +77 -0
- pyasn1_alt_modules/rfc3779.py +139 -0
- pyasn1_alt_modules/rfc3820.py +66 -0
- pyasn1_alt_modules/rfc3852.py +707 -0
- pyasn1_alt_modules/rfc3874.py +29 -0
- pyasn1_alt_modules/rfc4010.py +58 -0
- pyasn1_alt_modules/rfc4043.py +45 -0
- pyasn1_alt_modules/rfc4055.py +285 -0
- pyasn1_alt_modules/rfc4056.py +56 -0
- pyasn1_alt_modules/rfc4059.py +101 -0
- pyasn1_alt_modules/rfc4073.py +62 -0
- pyasn1_alt_modules/rfc4108.py +355 -0
- pyasn1_alt_modules/rfc4210.py +807 -0
- pyasn1_alt_modules/rfc4211.py +420 -0
- pyasn1_alt_modules/rfc4231.py +38 -0
- pyasn1_alt_modules/rfc4262.py +37 -0
- pyasn1_alt_modules/rfc4334.py +78 -0
- pyasn1_alt_modules/rfc4357.py +485 -0
- pyasn1_alt_modules/rfc4366.py +23 -0
- pyasn1_alt_modules/rfc4387.py +23 -0
- pyasn1_alt_modules/rfc4476.py +99 -0
- pyasn1_alt_modules/rfc4490.py +119 -0
- pyasn1_alt_modules/rfc4491.py +44 -0
- pyasn1_alt_modules/rfc4683.py +76 -0
- pyasn1_alt_modules/rfc4985.py +52 -0
- pyasn1_alt_modules/rfc4998.py +125 -0
- pyasn1_alt_modules/rfc5035.py +206 -0
- pyasn1_alt_modules/rfc5055.py +763 -0
- pyasn1_alt_modules/rfc5083.py +55 -0
- pyasn1_alt_modules/rfc5084.py +94 -0
- pyasn1_alt_modules/rfc5126.py +578 -0
- pyasn1_alt_modules/rfc5208.py +73 -0
- pyasn1_alt_modules/rfc5275.py +404 -0
- pyasn1_alt_modules/rfc5276.py +82 -0
- pyasn1_alt_modules/rfc5280.py +1666 -0
- pyasn1_alt_modules/rfc5480.py +190 -0
- pyasn1_alt_modules/rfc5544.py +127 -0
- pyasn1_alt_modules/rfc5636.py +117 -0
- pyasn1_alt_modules/rfc5639.py +49 -0
- pyasn1_alt_modules/rfc5649.py +33 -0
- pyasn1_alt_modules/rfc5652.py +763 -0
- pyasn1_alt_modules/rfc5697.py +64 -0
- pyasn1_alt_modules/rfc5698.py +159 -0
- pyasn1_alt_modules/rfc5751.py +127 -0
- pyasn1_alt_modules/rfc5752.py +52 -0
- pyasn1_alt_modules/rfc5753.py +163 -0
- pyasn1_alt_modules/rfc5755.py +400 -0
- pyasn1_alt_modules/rfc5913.py +46 -0
- pyasn1_alt_modules/rfc5914.py +119 -0
- pyasn1_alt_modules/rfc5915.py +32 -0
- pyasn1_alt_modules/rfc5916.py +39 -0
- pyasn1_alt_modules/rfc5917.py +59 -0
- pyasn1_alt_modules/rfc5924.py +19 -0
- pyasn1_alt_modules/rfc5934.py +786 -0
- pyasn1_alt_modules/rfc5940.py +62 -0
- pyasn1_alt_modules/rfc5958.py +100 -0
- pyasn1_alt_modules/rfc5990.py +238 -0
- pyasn1_alt_modules/rfc6010.py +92 -0
- pyasn1_alt_modules/rfc6019.py +46 -0
- pyasn1_alt_modules/rfc6031.py +469 -0
- pyasn1_alt_modules/rfc6032.py +71 -0
- pyasn1_alt_modules/rfc6066.py +25 -0
- pyasn1_alt_modules/rfc6120.py +46 -0
- pyasn1_alt_modules/rfc6170.py +17 -0
- pyasn1_alt_modules/rfc6187.py +22 -0
- pyasn1_alt_modules/rfc6210.py +45 -0
- pyasn1_alt_modules/rfc6211.py +75 -0
- pyasn1_alt_modules/rfc6402.py +643 -0
- pyasn1_alt_modules/rfc6482.py +77 -0
- pyasn1_alt_modules/rfc6484.py +17 -0
- pyasn1_alt_modules/rfc6486.py +70 -0
- pyasn1_alt_modules/rfc6487.py +22 -0
- pyasn1_alt_modules/rfc6492.py +41 -0
- pyasn1_alt_modules/rfc6493.py +24 -0
- pyasn1_alt_modules/rfc6494.py +23 -0
- pyasn1_alt_modules/rfc6664.py +151 -0
- pyasn1_alt_modules/rfc6955.py +112 -0
- pyasn1_alt_modules/rfc6960.py +234 -0
- pyasn1_alt_modules/rfc6962.py +52 -0
- pyasn1_alt_modules/rfc7030.py +70 -0
- pyasn1_alt_modules/rfc7191.py +267 -0
- pyasn1_alt_modules/rfc7229.py +29 -0
- pyasn1_alt_modules/rfc7292.py +359 -0
- pyasn1_alt_modules/rfc7296.py +32 -0
- pyasn1_alt_modules/rfc7508.py +92 -0
- pyasn1_alt_modules/rfc7585.py +53 -0
- pyasn1_alt_modules/rfc7633.py +40 -0
- pyasn1_alt_modules/rfc7693.py +66 -0
- pyasn1_alt_modules/rfc7773.py +54 -0
- pyasn1_alt_modules/rfc7836.py +65 -0
- pyasn1_alt_modules/rfc7894.py +100 -0
- pyasn1_alt_modules/rfc7906.py +739 -0
- pyasn1_alt_modules/rfc7914.py +55 -0
- pyasn1_alt_modules/rfc8017.py +159 -0
- pyasn1_alt_modules/rfc8018.py +269 -0
- pyasn1_alt_modules/rfc8103.py +36 -0
- pyasn1_alt_modules/rfc8209.py +20 -0
- pyasn1_alt_modules/rfc8226.py +151 -0
- pyasn1_alt_modules/rfc8358.py +54 -0
- pyasn1_alt_modules/rfc8360.py +46 -0
- pyasn1_alt_modules/rfc8398.py +55 -0
- pyasn1_alt_modules/rfc8410.py +43 -0
- pyasn1_alt_modules/rfc8418.py +36 -0
- pyasn1_alt_modules/rfc8419.py +70 -0
- pyasn1_alt_modules/rfc8479.py +48 -0
- pyasn1_alt_modules/rfc8494.py +80 -0
- pyasn1_alt_modules/rfc8520.py +66 -0
- pyasn1_alt_modules/rfc8619.py +45 -0
- pyasn1_alt_modules/rfc8649.py +42 -0
- pyasn1_alt_modules/rfc8692.py +79 -0
- pyasn1_alt_modules/rfc8696.py +108 -0
- pyasn1_alt_modules/rfc8702.py +109 -0
- pyasn1_alt_modules/rfc8708.py +43 -0
- pyasn1_alt_modules/rfc8737.py +36 -0
- pyasn1_alt_modules/rfc8769.py +21 -0
- pyasn1_alt_modules/rfc8894.py +52 -0
- pyasn1_alt_modules/rfc8951.py +42 -0
- pyasn1_alt_modules/rfc8954.py +238 -0
- pyasn1_alt_modules/rfc8994.py +52 -0
- pyasn1_alt_modules/rfc8995.py +39 -0
- pyasn1_alt_modules/rfc9044.py +80 -0
- pyasn1_alt_modules/rfc9092.py +35 -0
- pyasn1_alt_modules/rfc9118.py +82 -0
- pyasn1_alt_modules/rfc9174.py +55 -0
- pyasn1_alt_modules/rfc9189.py +74 -0
- pyasn1_alt_modules/rfc9215.py +228 -0
- pyasn1_alt_modules/rfc9286.py +78 -0
- pyasn1_alt_modules/rfc9289.py +22 -0
- pyasn1_alt_modules/rfc9310.py +46 -0
- pyasn1_alt_modules/rfc9323.py +129 -0
- pyasn1_alt_modules/rfc9336.py +20 -0
- pyasn1_alt_modules/rfc9337.py +74 -0
- pyasn1_alt_modules/rfc9345.py +36 -0
- pyasn1_alt_modules/rfc9385.py +22 -0
- pyasn1_alt_modules/rfc9399.py +59 -0
- pyasn1_alt_modules/rfc9480.py +731 -0
- pyasn1_alt_modules/rfc9481.py +224 -0
- pyasn1_alt_modules/rfc9509.py +24 -0
- pyasn1_alt_modules/rfc9548.py +23 -0
- pyasn1_alt_modules/rfc9579.py +89 -0
- pyasn1_alt_modules/rfc9582.py +107 -0
- pyasn1_alt_modules/rfc9598.py +52 -0
- pyasn1_alt_modules/rfc9608.py +35 -0
- pyasn1_alt_modules/rfc9629.py +100 -0
- pyasn1_alt_modules/rfc9654.py +241 -0
- pyasn1_alt_modules-0.4.5.dist-info/LICENSE.txt +25 -0
- pyasn1_alt_modules-0.4.5.dist-info/METADATA +34 -0
- pyasn1_alt_modules-0.4.5.dist-info/RECORD +195 -0
- pyasn1_alt_modules-0.4.5.dist-info/WHEEL +5 -0
- pyasn1_alt_modules-0.4.5.dist-info/top_level.txt +1 -0
- pyasn1_alt_modules-0.4.5.dist-info/zip-safe +1 -0
|
@@ -0,0 +1,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)
|
|
@@ -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
|