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,77 @@
|
|
|
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
|
+
# Modified by Russ Housley to include the opentypemap manager.
|
|
6
|
+
#
|
|
7
|
+
# Copyright (c) 2019-2024, Vigil Security, LLC
|
|
8
|
+
# License: http://vigilsec.com/pyasn1-alt-modules-license.txt
|
|
9
|
+
#
|
|
10
|
+
# RPKI Route Origin Authorizations (ROAs)
|
|
11
|
+
#
|
|
12
|
+
# ASN.1 source from:
|
|
13
|
+
# https://www.rfc-editor.org/rfc/rfc6482.txt
|
|
14
|
+
# https://www.rfc-editor.org/errata/eid5881
|
|
15
|
+
#
|
|
16
|
+
|
|
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
|
+
|
|
22
|
+
from pyasn1_alt_modules import rfc5652
|
|
23
|
+
from pyasn1_alt_modules import opentypemap
|
|
24
|
+
|
|
25
|
+
cmsContentTypesMap = opentypemap.get('cmsContentTypesMap')
|
|
26
|
+
|
|
27
|
+
MAX = float('inf')
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
id_ct_routeOriginAuthz = univ.ObjectIdentifier('1.2.840.113549.1.9.16.1.24')
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class ASID(univ.Integer):
|
|
34
|
+
pass
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class IPAddress(univ.BitString):
|
|
38
|
+
pass
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class ROAIPAddress(univ.Sequence):
|
|
42
|
+
componentType = namedtype.NamedTypes(
|
|
43
|
+
namedtype.NamedType('address', IPAddress()),
|
|
44
|
+
namedtype.OptionalNamedType('maxLength', univ.Integer())
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
class ROAIPAddressFamily(univ.Sequence):
|
|
49
|
+
componentType = namedtype.NamedTypes(
|
|
50
|
+
namedtype.NamedType('addressFamily',
|
|
51
|
+
univ.OctetString().subtype(
|
|
52
|
+
subtypeSpec=constraint.ValueSizeConstraint(2, 3))),
|
|
53
|
+
namedtype.NamedType('addresses',
|
|
54
|
+
univ.SequenceOf(componentType=ROAIPAddress()).subtype(
|
|
55
|
+
subtypeSpec=constraint.ValueSizeConstraint(1, MAX)))
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
class RouteOriginAttestation(univ.Sequence):
|
|
60
|
+
componentType = namedtype.NamedTypes(
|
|
61
|
+
namedtype.DefaultedNamedType('version',
|
|
62
|
+
univ.Integer().subtype(explicitTag=tag.Tag(
|
|
63
|
+
tag.tagClassContext, tag.tagFormatSimple, 0)).subtype(value=0)),
|
|
64
|
+
namedtype.NamedType('asID', ASID()),
|
|
65
|
+
namedtype.NamedType('ipAddrBlocks',
|
|
66
|
+
univ.SequenceOf(componentType=ROAIPAddressFamily()).subtype(
|
|
67
|
+
subtypeSpec=constraint.ValueSizeConstraint(1, MAX)))
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
# Update the CMS Content Types Map
|
|
72
|
+
|
|
73
|
+
_cmsContentTypesMapUpdate = {
|
|
74
|
+
id_ct_routeOriginAuthz: RouteOriginAttestation(),
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
cmsContentTypesMap.update(_cmsContentTypesMapUpdate)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file is part of pyasn1-alt-modules software.
|
|
3
|
+
#
|
|
4
|
+
# Created by Russ Housley.
|
|
5
|
+
#
|
|
6
|
+
# Copyright (c) 2020-2024, Vigil Security, LLC
|
|
7
|
+
# License: http://vigilsec.com/pyasn1-alt-modules-license.txt
|
|
8
|
+
#
|
|
9
|
+
# RPKI Certificate Policy Identifier
|
|
10
|
+
#
|
|
11
|
+
# ASN.1 source from:
|
|
12
|
+
# https://www.rfc-editor.org/rfc/rfc6484.txt
|
|
13
|
+
#
|
|
14
|
+
|
|
15
|
+
from pyasn1.type import univ
|
|
16
|
+
|
|
17
|
+
id_cp_ipAddr_asNumber = univ.ObjectIdentifier('1.3.6.1.5.5.7.14.2')
|
|
@@ -0,0 +1,70 @@
|
|
|
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
|
+
# Modified by Russ Housley to include the opentypemap manager.
|
|
6
|
+
#
|
|
7
|
+
# Copyright (c) 2019-2024, Vigil Security, LLC
|
|
8
|
+
# License: http://vigilsec.com/pyasn1-alt-modules-license.txt
|
|
9
|
+
#
|
|
10
|
+
# RPKI Manifests
|
|
11
|
+
#
|
|
12
|
+
# ASN.1 source from:
|
|
13
|
+
# https://www.rfc-editor.org/rfc/rfc6486.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 useful
|
|
21
|
+
from pyasn1.type import univ
|
|
22
|
+
|
|
23
|
+
from pyasn1_alt_modules import opentypemap
|
|
24
|
+
|
|
25
|
+
cmsContentTypesMap = opentypemap.get('cmsContentTypesMap')
|
|
26
|
+
|
|
27
|
+
MAX = float('inf')
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
id_smime = univ.ObjectIdentifier('1.2.840.113549.1.9.16')
|
|
31
|
+
|
|
32
|
+
id_ct = id_smime + (1, )
|
|
33
|
+
|
|
34
|
+
id_ct_rpkiManifest = id_ct + (26, )
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class FileAndHash(univ.Sequence):
|
|
38
|
+
componentType = namedtype.NamedTypes(
|
|
39
|
+
namedtype.NamedType('file', char.IA5String()),
|
|
40
|
+
namedtype.NamedType('hash', univ.BitString())
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class Manifest(univ.Sequence):
|
|
45
|
+
componentType = namedtype.NamedTypes(
|
|
46
|
+
namedtype.DefaultedNamedType('version',
|
|
47
|
+
univ.Integer().subtype(explicitTag=tag.Tag(
|
|
48
|
+
tag.tagClassContext, tag.tagFormatSimple, 0)).subtype(value=0)),
|
|
49
|
+
namedtype.NamedType('manifestNumber',
|
|
50
|
+
univ.Integer().subtype(
|
|
51
|
+
subtypeSpec=constraint.ValueRangeConstraint(0, MAX))),
|
|
52
|
+
namedtype.NamedType('thisUpdate',
|
|
53
|
+
useful.GeneralizedTime()),
|
|
54
|
+
namedtype.NamedType('nextUpdate',
|
|
55
|
+
useful.GeneralizedTime()),
|
|
56
|
+
namedtype.NamedType('fileHashAlg',
|
|
57
|
+
univ.ObjectIdentifier()),
|
|
58
|
+
namedtype.NamedType('fileList',
|
|
59
|
+
univ.SequenceOf(componentType=FileAndHash()).subtype(
|
|
60
|
+
subtypeSpec=constraint.ValueSizeConstraint(0, MAX)))
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
# Update the CMS Content Types Map
|
|
65
|
+
|
|
66
|
+
_cmsContentTypesMapUpdate = {
|
|
67
|
+
id_ct_rpkiManifest: Manifest(),
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
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) 2019-2024, Vigil Security, LLC
|
|
7
|
+
# License: http://vigilsec.com/pyasn1-alt-modules-license.txt
|
|
8
|
+
#
|
|
9
|
+
# Profile for X.509 PKIX Resource Certificates
|
|
10
|
+
#
|
|
11
|
+
# ASN.1 source from:
|
|
12
|
+
# https://www.rfc-editor.org/rfc/rfc6487.txt
|
|
13
|
+
#
|
|
14
|
+
|
|
15
|
+
from pyasn1.type import univ
|
|
16
|
+
|
|
17
|
+
id_pkix = univ.ObjectIdentifier('1.3.6.1.5.5.7')
|
|
18
|
+
|
|
19
|
+
id_ad = id_pkix + (48, )
|
|
20
|
+
|
|
21
|
+
id_ad_rpkiManifest = id_ad + (10, )
|
|
22
|
+
id_ad_signedObject = id_ad + (11, )
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
# A Protocol for Provisioning Resource Certificates
|
|
11
|
+
#
|
|
12
|
+
# ASN.1 source from:
|
|
13
|
+
# https://www.rfc-editor.org/rfc/rfc6492.txt
|
|
14
|
+
#
|
|
15
|
+
|
|
16
|
+
from pyasn1.type import univ
|
|
17
|
+
|
|
18
|
+
from pyasn1_alt_modules import opentypemap
|
|
19
|
+
|
|
20
|
+
cmsContentTypesMap = opentypemap.get('cmsContentTypesMap')
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
# Content Type for Provisioning Resource Certificates
|
|
24
|
+
|
|
25
|
+
id_smime = univ.ObjectIdentifier('1.2.840.113549.1.9.16')
|
|
26
|
+
|
|
27
|
+
id_ct = id_smime + (1,)
|
|
28
|
+
|
|
29
|
+
id_ct_xml = id_ct + (28,)
|
|
30
|
+
|
|
31
|
+
class RPKIXMLProtocolObject(univ.OctetString):
|
|
32
|
+
pass
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
# Update the CMS Content Types Map
|
|
36
|
+
|
|
37
|
+
_cmsContentTypesMapUpdate = {
|
|
38
|
+
id_ct_xml: RPKIXMLProtocolObject(),
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
cmsContentTypesMap.update(_cmsContentTypesMapUpdate)
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
# RPKI Ghostbusters Record
|
|
10
|
+
#
|
|
11
|
+
# ASN.1 source from:
|
|
12
|
+
# https://www.rfc-editor.org/rfc/rfc6493.txt
|
|
13
|
+
#
|
|
14
|
+
|
|
15
|
+
from pyasn1.type import univ
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# Content Type for Ghostbusters Records
|
|
19
|
+
|
|
20
|
+
id_ct_rpkiGhostbusters =univ.ObjectIdentifier('1.2.840.113549.1.9.16.1.35')
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
# There is no need for an entry in the CMS Content Type Map because
|
|
24
|
+
# the vCard is carried directly in the CMS eContent OCTET STRING.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file is part of pyasn1-alt-modules software.
|
|
3
|
+
#
|
|
4
|
+
# Created by Russ Housley.
|
|
5
|
+
#
|
|
6
|
+
# Copyright (c) 2020-2024, Vigil Security, LLC
|
|
7
|
+
# License: http://vigilsec.com/pyasn1-alt-modules-license.txt
|
|
8
|
+
#
|
|
9
|
+
# Certificate Profile and Certificate Management for
|
|
10
|
+
# SEcure Neighbor Discovery (SEND)
|
|
11
|
+
#
|
|
12
|
+
# ASN.1 source from:
|
|
13
|
+
# https://www.rfc-editor.org/rfc/rfc6494.txt
|
|
14
|
+
#
|
|
15
|
+
|
|
16
|
+
from pyasn1.type import univ
|
|
17
|
+
|
|
18
|
+
id_kp = univ.ObjectIdentifier('1.3.6.1.5.5.7.3')
|
|
19
|
+
|
|
20
|
+
id_kp_sendOwner = id_kp + (25, )
|
|
21
|
+
id_kp_sendProxiedOwner = id_kp + (26, )
|
|
22
|
+
id_kp_sendProxiedRouter = id_kp + (24, )
|
|
23
|
+
id_kp_sendRouter = id_kp + (23, )
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
#
|
|
2
|
+
# This file is part of pyasn1-alt-modules software.
|
|
3
|
+
#
|
|
4
|
+
# Created by Russ Housley with some assistance from asn1ate v.0.6.0.
|
|
5
|
+
# Modified by Russ Housley to include the opentypemap manager.
|
|
6
|
+
#
|
|
7
|
+
# Copyright (c) 2019-2024, Vigil Security, LLC
|
|
8
|
+
# License: http://vigilsec.com/pyasn1-alt-modules-license.txt
|
|
9
|
+
#
|
|
10
|
+
# S/MIME Capabilities for Public Key Definitions
|
|
11
|
+
#
|
|
12
|
+
# ASN.1 source from:
|
|
13
|
+
# https://www.rfc-editor.org/rfc/rfc6664.txt
|
|
14
|
+
#
|
|
15
|
+
|
|
16
|
+
from pyasn1.type import constraint
|
|
17
|
+
from pyasn1.type import namedtype
|
|
18
|
+
from pyasn1.type import tag
|
|
19
|
+
from pyasn1.type import univ
|
|
20
|
+
|
|
21
|
+
from pyasn1_alt_modules import rfc5280
|
|
22
|
+
from pyasn1_alt_modules import rfc5751
|
|
23
|
+
from pyasn1_alt_modules import rfc5480
|
|
24
|
+
from pyasn1_alt_modules import rfc4055
|
|
25
|
+
from pyasn1_alt_modules import rfc3279
|
|
26
|
+
from pyasn1_alt_modules import opentypemap
|
|
27
|
+
|
|
28
|
+
smimeCapabilityMap = opentypemap.get('smimeCapabilityMap')
|
|
29
|
+
|
|
30
|
+
MAX = float('inf')
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
# Imports from RFC 5280
|
|
34
|
+
|
|
35
|
+
AlgorithmIdentifier = rfc5280.AlgorithmIdentifier
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
# Imports from RFC 3279
|
|
39
|
+
|
|
40
|
+
dhpublicnumber = rfc3279.dhpublicnumber
|
|
41
|
+
|
|
42
|
+
Dss_Parms = rfc3279.Dss_Parms
|
|
43
|
+
|
|
44
|
+
id_dsa = rfc3279.id_dsa
|
|
45
|
+
|
|
46
|
+
id_ecPublicKey = rfc3279.id_ecPublicKey
|
|
47
|
+
|
|
48
|
+
rsaEncryption = rfc3279.rsaEncryption
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
# Imports from RFC 4055
|
|
52
|
+
|
|
53
|
+
id_mgf1 = rfc4055.id_mgf1
|
|
54
|
+
|
|
55
|
+
id_RSAES_OAEP = rfc4055.id_RSAES_OAEP
|
|
56
|
+
|
|
57
|
+
id_RSASSA_PSS = rfc4055.id_RSASSA_PSS
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
# Imports from RFC 5480
|
|
61
|
+
|
|
62
|
+
ECParameters = rfc5480.ECParameters
|
|
63
|
+
|
|
64
|
+
id_ecDH = rfc5480.id_ecDH
|
|
65
|
+
|
|
66
|
+
id_ecMQV = rfc5480.id_ecMQV
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
# RSA
|
|
70
|
+
|
|
71
|
+
class RSAKeySize(univ.Integer):
|
|
72
|
+
# suggested values are 1024, 2048, 3072, 4096, 7680, 8192, and 15360;
|
|
73
|
+
# however, the integer value is not limited to these suggestions
|
|
74
|
+
pass
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
class RSAKeyCapabilities(univ.Sequence):
|
|
78
|
+
componentType = namedtype.NamedTypes(
|
|
79
|
+
namedtype.NamedType('minKeySize', RSAKeySize()),
|
|
80
|
+
namedtype.OptionalNamedType('maxKeySize', RSAKeySize())
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
class RsaSsa_Pss_sig_caps(univ.Sequence):
|
|
85
|
+
componentType = namedtype.NamedTypes(
|
|
86
|
+
namedtype.NamedType('hashAlg', AlgorithmIdentifier()),
|
|
87
|
+
namedtype.OptionalNamedType('maskAlg', AlgorithmIdentifier()),
|
|
88
|
+
namedtype.DefaultedNamedType('trailerField', univ.Integer().subtype(value=1))
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
# Diffie-Hellman and DSA
|
|
93
|
+
|
|
94
|
+
class DSAKeySize(univ.Integer):
|
|
95
|
+
subtypeSpec = constraint.SingleValueConstraint(1024, 2048, 3072, 7680, 15360)
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
class DSAKeyCapabilities(univ.Choice):
|
|
99
|
+
componentType = namedtype.NamedTypes(
|
|
100
|
+
namedtype.NamedType('keySizes', univ.Sequence(componentType=namedtype.NamedTypes(
|
|
101
|
+
namedtype.NamedType('minKeySize',
|
|
102
|
+
DSAKeySize()),
|
|
103
|
+
namedtype.OptionalNamedType('maxKeySize',
|
|
104
|
+
DSAKeySize()),
|
|
105
|
+
namedtype.OptionalNamedType('maxSizeP',
|
|
106
|
+
univ.Integer().subtype(explicitTag=tag.Tag(
|
|
107
|
+
tag.tagClassContext, tag.tagFormatSimple, 1))),
|
|
108
|
+
namedtype.OptionalNamedType('maxSizeQ',
|
|
109
|
+
univ.Integer().subtype(explicitTag=tag.Tag(
|
|
110
|
+
tag.tagClassContext, tag.tagFormatSimple, 2))),
|
|
111
|
+
namedtype.OptionalNamedType('maxSizeG',
|
|
112
|
+
univ.Integer().subtype(explicitTag=tag.Tag(
|
|
113
|
+
tag.tagClassContext, tag.tagFormatSimple, 3)))
|
|
114
|
+
)).subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0))),
|
|
115
|
+
namedtype.NamedType('keyParams',
|
|
116
|
+
Dss_Parms().subtype(explicitTag=tag.Tag(
|
|
117
|
+
tag.tagClassContext, tag.tagFormatConstructed, 1)))
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
# Elliptic Curve
|
|
122
|
+
|
|
123
|
+
class EC_SMimeCaps(univ.SequenceOf):
|
|
124
|
+
componentType = ECParameters()
|
|
125
|
+
subtypeSpec=constraint.ValueSizeConstraint(1, MAX)
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
# Update the SMIMECapabilities Attribute Map
|
|
129
|
+
#
|
|
130
|
+
# The map can either include an entry for scap-sa-rsaSSA-PSS or
|
|
131
|
+
# scap-pk-rsaSSA-PSS, but not both. One is associated with the
|
|
132
|
+
# public key and the other is associated with the signature
|
|
133
|
+
# algorithm; however, they use the same OID. If you need the
|
|
134
|
+
# other one in your application, copy the map into a local dict,
|
|
135
|
+
# adjust as needed, and pass the local dict to the decoder with
|
|
136
|
+
# openTypes=your_local_map.
|
|
137
|
+
|
|
138
|
+
_smimeCapabilityMapUpdate = {
|
|
139
|
+
rsaEncryption: RSAKeyCapabilities(),
|
|
140
|
+
id_RSASSA_PSS: RSAKeyCapabilities(),
|
|
141
|
+
# id_RSASSA_PSS: RsaSsa_Pss_sig_caps(),
|
|
142
|
+
id_RSAES_OAEP: RSAKeyCapabilities(),
|
|
143
|
+
id_dsa: DSAKeyCapabilities(),
|
|
144
|
+
dhpublicnumber: DSAKeyCapabilities(),
|
|
145
|
+
id_ecPublicKey: EC_SMimeCaps(),
|
|
146
|
+
id_ecDH: EC_SMimeCaps(),
|
|
147
|
+
id_ecMQV: EC_SMimeCaps(),
|
|
148
|
+
id_mgf1: AlgorithmIdentifier(),
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
smimeCapabilityMap.update(_smimeCapabilityMapUpdate)
|
|
@@ -0,0 +1,112 @@
|
|
|
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) 2019-2024, Vigil Security, LLC
|
|
8
|
+
# License: http://vigilsec.com/pyasn1-alt-modules-license.txt
|
|
9
|
+
#
|
|
10
|
+
# Diffie-Hellman Proof-of-Possession Algorithms
|
|
11
|
+
#
|
|
12
|
+
# ASN.1 source from:
|
|
13
|
+
# https://www.rfc-editor.org/rfc/rfc6955.txt
|
|
14
|
+
#
|
|
15
|
+
|
|
16
|
+
from pyasn1.type import namedtype
|
|
17
|
+
from pyasn1.type import univ
|
|
18
|
+
|
|
19
|
+
from pyasn1_alt_modules import rfc3279
|
|
20
|
+
from pyasn1_alt_modules import rfc5280
|
|
21
|
+
from pyasn1_alt_modules import rfc5652
|
|
22
|
+
from pyasn1_alt_modules import opentypemap
|
|
23
|
+
|
|
24
|
+
algorithmIdentifierMap = opentypemap.get('algorithmIdentifierMap')
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
# Imports from RFC 5652
|
|
28
|
+
|
|
29
|
+
MessageDigest = rfc5652.MessageDigest
|
|
30
|
+
|
|
31
|
+
IssuerAndSerialNumber = rfc5652.IssuerAndSerialNumber
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
# Imports from RFC 5280
|
|
35
|
+
|
|
36
|
+
id_pkix = rfc5280.id_pkix
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
# Imports from RFC 3279
|
|
40
|
+
|
|
41
|
+
Dss_Sig_Value = rfc3279.Dss_Sig_Value
|
|
42
|
+
|
|
43
|
+
DomainParameters = rfc3279.DomainParameters
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
# Static DH Proof-of-Possession
|
|
47
|
+
|
|
48
|
+
class DhSigStatic(univ.Sequence):
|
|
49
|
+
componentType = namedtype.NamedTypes(
|
|
50
|
+
namedtype.OptionalNamedType('issuerAndSerial', IssuerAndSerialNumber()),
|
|
51
|
+
namedtype.NamedType('hashValue', MessageDigest())
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
# Object Identifiers
|
|
56
|
+
|
|
57
|
+
id_dh_sig_hmac_sha1 = id_pkix + (6, 3, )
|
|
58
|
+
|
|
59
|
+
id_dhPop_static_sha1_hmac_sha1 = univ.ObjectIdentifier(id_dh_sig_hmac_sha1)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
id_alg_dh_pop = id_pkix + (6, 4, )
|
|
63
|
+
|
|
64
|
+
id_alg_dhPop_sha1 = univ.ObjectIdentifier(id_alg_dh_pop)
|
|
65
|
+
|
|
66
|
+
id_alg_dhPop_sha224 = id_pkix + (6, 5, )
|
|
67
|
+
|
|
68
|
+
id_alg_dhPop_sha256 = id_pkix + (6, 6, )
|
|
69
|
+
|
|
70
|
+
id_alg_dhPop_sha384 = id_pkix + (6, 7, )
|
|
71
|
+
|
|
72
|
+
id_alg_dhPop_sha512 = id_pkix + (6, 8, )
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
id_alg_dhPop_static_sha224_hmac_sha224 = id_pkix + (6, 15, )
|
|
76
|
+
|
|
77
|
+
id_alg_dhPop_static_sha256_hmac_sha256 = id_pkix + (6, 16, )
|
|
78
|
+
|
|
79
|
+
id_alg_dhPop_static_sha384_hmac_sha384 = id_pkix + (6, 17, )
|
|
80
|
+
|
|
81
|
+
id_alg_dhPop_static_sha512_hmac_sha512 = id_pkix + (6, 18, )
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
id_alg_ecdhPop_static_sha224_hmac_sha224 = id_pkix + (6, 25, )
|
|
85
|
+
|
|
86
|
+
id_alg_ecdhPop_static_sha256_hmac_sha256 = id_pkix + (6, 26, )
|
|
87
|
+
|
|
88
|
+
id_alg_ecdhPop_static_sha384_hmac_sha384 = id_pkix + (6, 27, )
|
|
89
|
+
|
|
90
|
+
id_alg_ecdhPop_static_sha512_hmac_sha512 = id_pkix + (6, 28, )
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
# Update the Algorithm Identifier Map
|
|
94
|
+
|
|
95
|
+
_algorithmIdentifierMapUpdate = {
|
|
96
|
+
id_alg_dh_pop: DomainParameters(),
|
|
97
|
+
id_alg_dhPop_sha224: DomainParameters(),
|
|
98
|
+
id_alg_dhPop_sha256: DomainParameters(),
|
|
99
|
+
id_alg_dhPop_sha384: DomainParameters(),
|
|
100
|
+
id_alg_dhPop_sha512: DomainParameters(),
|
|
101
|
+
id_dh_sig_hmac_sha1: univ.Null(""),
|
|
102
|
+
id_alg_dhPop_static_sha224_hmac_sha224: univ.Null(""),
|
|
103
|
+
id_alg_dhPop_static_sha256_hmac_sha256: univ.Null(""),
|
|
104
|
+
id_alg_dhPop_static_sha384_hmac_sha384: univ.Null(""),
|
|
105
|
+
id_alg_dhPop_static_sha512_hmac_sha512: univ.Null(""),
|
|
106
|
+
id_alg_ecdhPop_static_sha224_hmac_sha224: univ.Null(""),
|
|
107
|
+
id_alg_ecdhPop_static_sha256_hmac_sha256: univ.Null(""),
|
|
108
|
+
id_alg_ecdhPop_static_sha384_hmac_sha384: univ.Null(""),
|
|
109
|
+
id_alg_ecdhPop_static_sha512_hmac_sha512: univ.Null(""),
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
algorithmIdentifierMap.update(_algorithmIdentifierMapUpdate)
|