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,39 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file is part of pyasn1-alt-modules software.
|
|
3
|
+
#
|
|
4
|
+
# Created by Russ Housley.
|
|
5
|
+
# Modified by Russ Housley to include the opentypemap manager.
|
|
6
|
+
#
|
|
7
|
+
# Copyright (c) 2021-2024, Vigil Security, LLC
|
|
8
|
+
# License: http://vigilsec.com/pyasn1-alt-modules-license.txt
|
|
9
|
+
#
|
|
10
|
+
# BRSKI MASA Certificate Extension
|
|
11
|
+
#
|
|
12
|
+
# ASN.1 source from:
|
|
13
|
+
# https://www.rfc-editor.org/rfc/rfc8995.txt
|
|
14
|
+
#
|
|
15
|
+
|
|
16
|
+
from pyasn1.type import char
|
|
17
|
+
from pyasn1.type import univ
|
|
18
|
+
|
|
19
|
+
from pyasn1_alt_modules import opentypemap
|
|
20
|
+
|
|
21
|
+
certificateExtensionsMap = opentypemap.get('certificateExtensionsMap')
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
id_pe = univ.ObjectIdentifier((1, 3, 6, 1, 5, 5, 7, 1))
|
|
25
|
+
|
|
26
|
+
id_pe_masa_url = id_pe + (32,)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class MASAURLSyntax(char.IA5String):
|
|
30
|
+
pass
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
# Update the Certificate Extensions Map
|
|
34
|
+
|
|
35
|
+
_certificateExtensionsMapUpdate = {
|
|
36
|
+
id_pe_masa_url: MASAURLSyntax(),
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
certificateExtensionsMap.update(_certificateExtensionsMapUpdate)
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file is part of pyasn1-alt-modules software.
|
|
3
|
+
#
|
|
4
|
+
# Created by Russ Housley.
|
|
5
|
+
# Modified by Russ Housley to include the opentypemap manager.
|
|
6
|
+
#
|
|
7
|
+
# Copyright (c) 2021-2024, Vigil Security, LLC
|
|
8
|
+
# License: http://vigilsec.com/pyasn1-alt-modules-license.txt
|
|
9
|
+
#
|
|
10
|
+
# Algorithm Identifiers for AES-GMAC
|
|
11
|
+
#
|
|
12
|
+
# ASN.1 source from:
|
|
13
|
+
# https://www.rfc-editor.org/rfc/rfc9044.txt
|
|
14
|
+
#
|
|
15
|
+
|
|
16
|
+
from pyasn1.type import constraint
|
|
17
|
+
from pyasn1.type import namedtype
|
|
18
|
+
from pyasn1.type import univ
|
|
19
|
+
|
|
20
|
+
from pyasn1_alt_modules import rfc5280
|
|
21
|
+
from pyasn1_alt_modules import opentypemap
|
|
22
|
+
|
|
23
|
+
algorithmIdentifierMap = opentypemap.get('algorithmIdentifierMap')
|
|
24
|
+
|
|
25
|
+
smimeCapabilityMap = opentypemap.get('smimeCapabilityMap')
|
|
26
|
+
|
|
27
|
+
# Object Identifiers
|
|
28
|
+
|
|
29
|
+
aes = univ.ObjectIdentifier((2, 16, 840, 1, 101, 3, 4, 1))
|
|
30
|
+
|
|
31
|
+
id_aes128_GMAC = aes + (9, )
|
|
32
|
+
|
|
33
|
+
id_aes192_GMAC = aes + (29, )
|
|
34
|
+
|
|
35
|
+
id_aes256_GMAC = aes + (49, )
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
# GMAC Parameters
|
|
39
|
+
|
|
40
|
+
class MACLength(univ.Integer):
|
|
41
|
+
subtypeSpec = constraint.ValueRangeConstraint(12, 16)
|
|
42
|
+
|
|
43
|
+
class GCMParameters(univ.Sequence):
|
|
44
|
+
componentType = namedtype.NamedTypes(
|
|
45
|
+
namedtype.NamedType('nonce', univ.OctetString()),
|
|
46
|
+
# The nonce may have any number of bits between 8 and 2^64,
|
|
47
|
+
# but it MUST be a multiple of 8 bits. Within the scope of any
|
|
48
|
+
# content-authenticated-encryption key, the nonce value MUST be
|
|
49
|
+
# unique. A nonce value of 12 octets can be processed more
|
|
50
|
+
# efficiently, so that length is RECOMMENDED.
|
|
51
|
+
namedtype.DefaultedNamedType('length', MACLength().subtype(value=12))
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
# GMAC Algorithm Identifiers
|
|
56
|
+
|
|
57
|
+
maca_aes128_GMAC = rfc5280.AlgorithmIdentifier()
|
|
58
|
+
maca_aes128_GMAC['algorithm'] = id_aes128_GMAC
|
|
59
|
+
# maca_aes128_GMAC['parameters'] are absent
|
|
60
|
+
|
|
61
|
+
maca_aes192_GMAC = rfc5280.AlgorithmIdentifier()
|
|
62
|
+
maca_aes192_GMAC['algorithm'] = id_aes192_GMAC
|
|
63
|
+
# maca_aes192_GMAC['parameters'] are absent
|
|
64
|
+
|
|
65
|
+
maca_aes256_GMAC = rfc5280.AlgorithmIdentifier()
|
|
66
|
+
maca_aes256_GMAC['algorithm'] = id_aes256_GMAC
|
|
67
|
+
# maca_aes256_GMAC['parameters'] are absent
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
# Update the Algorithm Identifiers Map and the SMIMECapability Map
|
|
71
|
+
|
|
72
|
+
_algorithmIdentifierMapUpdate = {
|
|
73
|
+
id_aes128_GMAC: GCMParameters(),
|
|
74
|
+
id_aes192_GMAC: GCMParameters(),
|
|
75
|
+
id_aes256_GMAC: GCMParameters(),
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
algorithmIdentifierMap.update(_algorithmIdentifierMapUpdate)
|
|
79
|
+
|
|
80
|
+
smimeCapabilityMap.update(_algorithmIdentifierMapUpdate)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file is part of pyasn1-alt-modules software.
|
|
3
|
+
#
|
|
4
|
+
# Created by Russ Housley.
|
|
5
|
+
#
|
|
6
|
+
# Copyright (c) 2021-2024, Vigil Security, LLC
|
|
7
|
+
# License: http://vigilsec.com/pyasn1-alt-modules-license.txt
|
|
8
|
+
#
|
|
9
|
+
# Digital Signatures on geofeed data
|
|
10
|
+
#
|
|
11
|
+
# ASN.1 source from:
|
|
12
|
+
# https://www.rfc-editor.org/rfc/rfc9092.txt
|
|
13
|
+
#
|
|
14
|
+
|
|
15
|
+
from pyasn1.type import univ
|
|
16
|
+
|
|
17
|
+
from pyasn1_alt_modules import opentypemap
|
|
18
|
+
|
|
19
|
+
cmsContentTypesMap = opentypemap.get('cmsContentTypesMap')
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# CMS Content Type for Geofeed CSV with CRLF
|
|
23
|
+
|
|
24
|
+
id_ct = univ.ObjectIdentifier('1.2.840.113549.1.9.16.1')
|
|
25
|
+
|
|
26
|
+
id_ct_geofeedCSVwithCRLF = id_ct + (47, )
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
# Update the CMS Content Type Map
|
|
30
|
+
|
|
31
|
+
_cmsContentTypesMapUpdate = {
|
|
32
|
+
id_ct_geofeedCSVwithCRLF: univ.OctetString(),
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
cmsContentTypesMap.update(_cmsContentTypesMapUpdate)
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# This file is part of pyasn1-alt-modules software.
|
|
2
|
+
#
|
|
3
|
+
# Created by Russ Housley.
|
|
4
|
+
#
|
|
5
|
+
# Copyright (c) 2021-2024, Vigil Security, LLC
|
|
6
|
+
# License: http://vigilsec.com/pyasn1-alt-modules-license.txt
|
|
7
|
+
#
|
|
8
|
+
# Enhanced JWT Claim Constraints certificate extensions
|
|
9
|
+
#
|
|
10
|
+
# ASN.1 source from:
|
|
11
|
+
# https://www.rfc-editor.org/rfc/rfc9118.txt
|
|
12
|
+
|
|
13
|
+
from pyasn1.type import char
|
|
14
|
+
from pyasn1.type import constraint
|
|
15
|
+
from pyasn1.type import namedtype
|
|
16
|
+
from pyasn1.type import tag
|
|
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
|
+
# EnhancedJWTClaimConstraints Certificate Extension
|
|
27
|
+
|
|
28
|
+
id_pe_eJWTClaimConstraints = univ.ObjectIdentifier('1.3.6.1.5.5.7.1.33')
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class JWTClaimName(char.IA5String):
|
|
32
|
+
pass
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class JWTClaimNames(univ.SequenceOf):
|
|
36
|
+
componentType = JWTClaimName()
|
|
37
|
+
subtypeSpec = constraint.ValueSizeConstraint(1, MAX)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class JWTClaimValues(univ.Sequence):
|
|
41
|
+
componentType = namedtype.NamedTypes(
|
|
42
|
+
namedtype.NamedType('claim', JWTClaimName()),
|
|
43
|
+
namedtype.NamedType('values', univ.SequenceOf(
|
|
44
|
+
componentType=char.UTF8String()).subtype(
|
|
45
|
+
sizeSpec=constraint.ValueSizeConstraint(1, MAX)))
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class JWTClaimValuesList(univ.SequenceOf):
|
|
50
|
+
componentType = JWTClaimValues()
|
|
51
|
+
subtypeSpec = constraint.ValueSizeConstraint(1, MAX)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class EnhancedJWTClaimConstraints(univ.Sequence):
|
|
55
|
+
componentType = namedtype.NamedTypes(
|
|
56
|
+
namedtype.OptionalNamedType('mustInclude',
|
|
57
|
+
JWTClaimNames().subtype(explicitTag=tag.Tag(
|
|
58
|
+
tag.tagClassContext, tag.tagFormatSimple, 0))),
|
|
59
|
+
namedtype.OptionalNamedType('permittedValues',
|
|
60
|
+
JWTClaimValuesList().subtype(explicitTag=tag.Tag(
|
|
61
|
+
tag.tagClassContext, tag.tagFormatSimple, 1))),
|
|
62
|
+
namedtype.OptionalNamedType('mustExclude',
|
|
63
|
+
JWTClaimNames().subtype(explicitTag=tag.Tag(
|
|
64
|
+
tag.tagClassContext, tag.tagFormatSimple, 2)))
|
|
65
|
+
)
|
|
66
|
+
subtypeSpec = constraint.ConstraintsUnion(
|
|
67
|
+
constraint.WithComponentsConstraint(
|
|
68
|
+
('mustInclude', constraint.ComponentPresentConstraint())),
|
|
69
|
+
constraint.WithComponentsConstraint(
|
|
70
|
+
('permittedValues', constraint.ComponentPresentConstraint())),
|
|
71
|
+
constraint.WithComponentsConstraint(
|
|
72
|
+
('mustExclude', constraint.ComponentPresentConstraint()))
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
# Update the Certificate Extension Map
|
|
77
|
+
|
|
78
|
+
_certificateExtensionsMapUpdate = {
|
|
79
|
+
id_pe_eJWTClaimConstraints: EnhancedJWTClaimConstraints(),
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
certificateExtensionsMap.update(_certificateExtensionsMapUpdate)
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file is part of pyasn1-alt-modules software.
|
|
3
|
+
#
|
|
4
|
+
# Created by Russ Housley.
|
|
5
|
+
#
|
|
6
|
+
# Copyright (c) 2021-2024, Vigil Security, LLC
|
|
7
|
+
# License: http://vigilsec.com/pyasn1-alt-modules-license.txt
|
|
8
|
+
#
|
|
9
|
+
# Delay-Tolerant Networking TCP Convergence Layer Version 4
|
|
10
|
+
#
|
|
11
|
+
# ASN.1 source from:
|
|
12
|
+
# https://www.rfc-editor.org/rfc/rfc9174.txt
|
|
13
|
+
#
|
|
14
|
+
|
|
15
|
+
from pyasn1.type import char
|
|
16
|
+
from pyasn1.type import univ
|
|
17
|
+
|
|
18
|
+
from pyasn1_alt_modules import rfc5280
|
|
19
|
+
from pyasn1_alt_modules import opentypemap
|
|
20
|
+
|
|
21
|
+
otherNamesMap = opentypemap.get('otherNamesMap')
|
|
22
|
+
|
|
23
|
+
id_pkix = rfc5280.id_pkix
|
|
24
|
+
|
|
25
|
+
id_kp = id_pkix + (3, )
|
|
26
|
+
|
|
27
|
+
id_on = id_pkix + (8, )
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# DTN Bundle EID
|
|
31
|
+
|
|
32
|
+
id_on_bundleEID = id_on + (11, )
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class BundleEID(char.IA5String):
|
|
36
|
+
pass
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
on_BundleEID = rfc5280.AnotherName()
|
|
40
|
+
on_BundleEID['type-id'] = id_on_bundleEID
|
|
41
|
+
on_BundleEID['value'] = BundleEID()
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
# Extended Key Usage for bundle security
|
|
45
|
+
|
|
46
|
+
id_kp_bundleSecurity = id_kp + (35, )
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
# Update the Other Names Map
|
|
50
|
+
|
|
51
|
+
_otherNamesMapUpdate = {
|
|
52
|
+
id_on_bundleEID: BundleEID(),
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
otherNamesMap.update(_otherNamesMapUpdate)
|
|
@@ -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 Cipher Suites for TLS 1.2
|
|
10
|
+
#
|
|
11
|
+
# ASN.1 source from:
|
|
12
|
+
# https://www.rfc-editor.org/rfc/rfc9189.txt
|
|
13
|
+
#
|
|
14
|
+
|
|
15
|
+
from pyasn1.type import namedtype
|
|
16
|
+
from pyasn1.type import namedval
|
|
17
|
+
from pyasn1.type import tag
|
|
18
|
+
from pyasn1.type import univ
|
|
19
|
+
|
|
20
|
+
from pyasn1_alt_modules import rfc5280
|
|
21
|
+
from pyasn1_alt_modules import rfc4357
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
#-- IMPORTS from RFC 9189
|
|
25
|
+
|
|
26
|
+
AlgorithmIdentifier = rfc5280.AlgorithmIdentifier
|
|
27
|
+
|
|
28
|
+
SubjectPublicKeyInfo = rfc5280.SubjectPublicKeyInfo
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
#-- IMPORTS from RFC 4357
|
|
32
|
+
|
|
33
|
+
Gost28147_89_Key = rfc4357.Gost28147_89_Key
|
|
34
|
+
|
|
35
|
+
Gost28147_89_MAC = rfc4357.Gost28147_89_MAC
|
|
36
|
+
|
|
37
|
+
Gost28147_89_EncryptedKey = rfc4357.Gost28147_89_EncryptedKey
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
#-- RFC 9189 -- Section 4.2.4.1 --
|
|
41
|
+
|
|
42
|
+
class GostKeyTransport(univ.Sequence):
|
|
43
|
+
componentType = namedtype.NamedTypes(
|
|
44
|
+
namedtype.NamedType('keyExp', univ.OctetString()),
|
|
45
|
+
namedtype.NamedType('ephemeralPublicKey', SubjectPublicKeyInfo()),
|
|
46
|
+
namedtype.OptionalNamedType('ukm', univ.OctetString())
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
#-- RFC 9189 -- Section 4.2.4.2 --
|
|
51
|
+
|
|
52
|
+
class GostR3410_TransportParameters(univ.Sequence):
|
|
53
|
+
componentType = namedtype.NamedTypes(
|
|
54
|
+
namedtype.NamedType('encryptionParamSet', univ.ObjectIdentifier()),
|
|
55
|
+
namedtype.OptionalNamedType('ephemeralPublicKey',
|
|
56
|
+
SubjectPublicKeyInfo().subtype(implicitTag=tag.Tag(
|
|
57
|
+
tag.tagClassContext, tag.tagFormatConstructed, 0))),
|
|
58
|
+
namedtype.NamedType('ukm', univ.OctetString())
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
class GostR3410_KeyTransport(univ.Sequence):
|
|
63
|
+
componentType = namedtype.NamedTypes(
|
|
64
|
+
namedtype.NamedType('sessionEncryptedKey', Gost28147_89_EncryptedKey()),
|
|
65
|
+
namedtype.OptionalNamedType('transportParameters',
|
|
66
|
+
GostR3410_TransportParameters().subtype(implicitTag=tag.Tag(
|
|
67
|
+
tag.tagClassContext, tag.tagFormatConstructed, 0)))
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
class TLSGostKeyTransportBlob(univ.Sequence):
|
|
72
|
+
componentType = namedtype.NamedTypes(
|
|
73
|
+
namedtype.NamedType('keyBlob', GostR3410_KeyTransport())
|
|
74
|
+
)
|
|
@@ -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,)
|