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
|
+
# Certificate Extensions and Attributes Supporting Authentication
|
|
11
|
+
# in PPP and Wireless LAN Networks
|
|
12
|
+
#
|
|
13
|
+
# ASN.1 source from:
|
|
14
|
+
# https://www.rfc-editor.org/rfc/rfc3770.txt
|
|
15
|
+
# https://www.rfc-editor.org/errata/eid234
|
|
16
|
+
#
|
|
17
|
+
|
|
18
|
+
from pyasn1.type import constraint
|
|
19
|
+
from pyasn1.type import univ
|
|
20
|
+
|
|
21
|
+
from pyasn1_alt_modules import opentypemap
|
|
22
|
+
|
|
23
|
+
certificateAttributesMap = opentypemap.get('certificateAttributesMap')
|
|
24
|
+
|
|
25
|
+
certificateExtensionsMap = opentypemap.get('certificateExtensionsMap')
|
|
26
|
+
|
|
27
|
+
MAX = float('inf')
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# Extended Key Usage Values
|
|
31
|
+
|
|
32
|
+
id_kp_eapOverLAN = univ.ObjectIdentifier('1.3.6.1.5.5.7.3.14')
|
|
33
|
+
|
|
34
|
+
id_kp_eapOverPPP = univ.ObjectIdentifier('1.3.6.1.5.5.7.3.13')
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
# Wireless LAN SSID Extension
|
|
38
|
+
|
|
39
|
+
id_pe_wlanSSID = univ.ObjectIdentifier('1.3.6.1.5.5.7.1.13')
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class SSID(univ.OctetString):
|
|
43
|
+
pass
|
|
44
|
+
|
|
45
|
+
SSID.subtypeSpec = constraint.ValueSizeConstraint(1, 32)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
class SSIDList(univ.SequenceOf):
|
|
49
|
+
pass
|
|
50
|
+
|
|
51
|
+
SSIDList.componentType = SSID()
|
|
52
|
+
SSIDList.subtypeSpec=constraint.ValueSizeConstraint(1, MAX)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
# Wireless LAN SSID Attribute Certificate Attribute
|
|
56
|
+
# Uses same syntax as the certificate extension: SSIDList
|
|
57
|
+
# Correction for https://www.rfc-editor.org/errata/eid234
|
|
58
|
+
|
|
59
|
+
id_aca_wlanSSID = univ.ObjectIdentifier('1.3.6.1.5.5.7.10.7')
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
# Update the Certificate Extension Map
|
|
63
|
+
|
|
64
|
+
_certificateExtensionsMapUpdate = {
|
|
65
|
+
id_pe_wlanSSID: SSIDList(),
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
certificateExtensionsMap.update(_certificateExtensionsMapUpdate)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
# Update the Certificate Attribute Map
|
|
72
|
+
|
|
73
|
+
_certificateAttributesMapUpdate = {
|
|
74
|
+
id_aca_wlanSSID: SSIDList(),
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
certificateAttributesMap.update(_certificateAttributesMapUpdate)
|
|
@@ -0,0 +1,139 @@
|
|
|
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 add maps for use with opentypes.
|
|
6
|
+
# Modified by Russ Housley to include the opentypemap manager.
|
|
7
|
+
#
|
|
8
|
+
# Copyright (c) 2019-2024, Vigil Security, LLC
|
|
9
|
+
# License: http://vigilsec.com/pyasn1-alt-modules-license.txt
|
|
10
|
+
#
|
|
11
|
+
# X.509 Extensions for IP Addresses and AS Identifiers
|
|
12
|
+
#
|
|
13
|
+
# ASN.1 source from:
|
|
14
|
+
# https://www.rfc-editor.org/rfc/rfc3779.txt
|
|
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 opentypemap
|
|
23
|
+
|
|
24
|
+
certificateExtensionsMap = opentypemap.get('certificateExtensionsMap')
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
# IP Address Delegation Extension
|
|
28
|
+
|
|
29
|
+
id_pe_ipAddrBlocks = univ.ObjectIdentifier('1.3.6.1.5.5.7.1.7')
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class IPAddress(univ.BitString):
|
|
33
|
+
pass
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class IPAddressRange(univ.Sequence):
|
|
37
|
+
pass
|
|
38
|
+
|
|
39
|
+
IPAddressRange.componentType = namedtype.NamedTypes(
|
|
40
|
+
namedtype.NamedType('min', IPAddress()),
|
|
41
|
+
namedtype.NamedType('max', IPAddress())
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class IPAddressOrRange(univ.Choice):
|
|
46
|
+
pass
|
|
47
|
+
|
|
48
|
+
IPAddressOrRange.componentType = namedtype.NamedTypes(
|
|
49
|
+
namedtype.NamedType('addressPrefix', IPAddress()),
|
|
50
|
+
namedtype.NamedType('addressRange', IPAddressRange())
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class IPAddressChoice(univ.Choice):
|
|
55
|
+
pass
|
|
56
|
+
|
|
57
|
+
IPAddressChoice.componentType = namedtype.NamedTypes(
|
|
58
|
+
namedtype.NamedType('inherit', univ.Null()),
|
|
59
|
+
namedtype.NamedType('addressesOrRanges', univ.SequenceOf(
|
|
60
|
+
componentType=IPAddressOrRange())
|
|
61
|
+
)
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
class IPAddressFamily(univ.Sequence):
|
|
66
|
+
pass
|
|
67
|
+
|
|
68
|
+
IPAddressFamily.componentType = namedtype.NamedTypes(
|
|
69
|
+
namedtype.NamedType('addressFamily', univ.OctetString().subtype(
|
|
70
|
+
subtypeSpec=constraint.ValueSizeConstraint(2, 3))),
|
|
71
|
+
namedtype.NamedType('ipAddressChoice', IPAddressChoice())
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
class IPAddrBlocks(univ.SequenceOf):
|
|
76
|
+
pass
|
|
77
|
+
|
|
78
|
+
IPAddrBlocks.componentType = IPAddressFamily()
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
# Autonomous System Identifier Delegation Extension
|
|
82
|
+
|
|
83
|
+
id_pe_autonomousSysIds = univ.ObjectIdentifier('1.3.6.1.5.5.7.1.8')
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
class ASId(univ.Integer):
|
|
87
|
+
pass
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
class ASRange(univ.Sequence):
|
|
91
|
+
pass
|
|
92
|
+
|
|
93
|
+
ASRange.componentType = namedtype.NamedTypes(
|
|
94
|
+
namedtype.NamedType('min', ASId()),
|
|
95
|
+
namedtype.NamedType('max', ASId())
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
class ASIdOrRange(univ.Choice):
|
|
100
|
+
pass
|
|
101
|
+
|
|
102
|
+
ASIdOrRange.componentType = namedtype.NamedTypes(
|
|
103
|
+
namedtype.NamedType('id', ASId()),
|
|
104
|
+
namedtype.NamedType('range', ASRange())
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
class ASIdentifierChoice(univ.Choice):
|
|
109
|
+
pass
|
|
110
|
+
|
|
111
|
+
ASIdentifierChoice.componentType = namedtype.NamedTypes(
|
|
112
|
+
namedtype.NamedType('inherit', univ.Null()),
|
|
113
|
+
namedtype.NamedType('asIdsOrRanges', univ.SequenceOf(
|
|
114
|
+
componentType=ASIdOrRange())
|
|
115
|
+
)
|
|
116
|
+
)
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
class ASIdentifiers(univ.Sequence):
|
|
120
|
+
pass
|
|
121
|
+
|
|
122
|
+
ASIdentifiers.componentType = namedtype.NamedTypes(
|
|
123
|
+
namedtype.OptionalNamedType('asnum', ASIdentifierChoice().subtype(
|
|
124
|
+
explicitTag=tag.Tag(tag.tagClassContext,
|
|
125
|
+
tag.tagFormatConstructed, 0))),
|
|
126
|
+
namedtype.OptionalNamedType('rdi', ASIdentifierChoice().subtype(
|
|
127
|
+
explicitTag=tag.Tag(tag.tagClassContext,
|
|
128
|
+
tag.tagFormatConstructed, 1)))
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
# Update the Certificate Extensions Map
|
|
133
|
+
|
|
134
|
+
_certificateExtensionsMapUpdate = {
|
|
135
|
+
id_pe_ipAddrBlocks: IPAddrBlocks(),
|
|
136
|
+
id_pe_autonomousSysIds: ASIdentifiers(),
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
certificateExtensionsMap.update(_certificateExtensionsMapUpdate)
|
|
@@ -0,0 +1,66 @@
|
|
|
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
|
+
# Diffie-Hellman Key Agreement
|
|
11
|
+
#
|
|
12
|
+
# ASN.1 source from:
|
|
13
|
+
# https://www.rfc-editor.org/rfc/rfc3820.txt
|
|
14
|
+
#
|
|
15
|
+
|
|
16
|
+
from pyasn1.type import namedtype
|
|
17
|
+
from pyasn1.type import univ
|
|
18
|
+
|
|
19
|
+
from pyasn1_alt_modules import opentypemap
|
|
20
|
+
|
|
21
|
+
certificateExtensionsMap = opentypemap.get('certificateExtensionsMap')
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class ProxyCertPathLengthConstraint(univ.Integer):
|
|
25
|
+
pass
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class ProxyPolicy(univ.Sequence):
|
|
29
|
+
componentType = namedtype.NamedTypes(
|
|
30
|
+
namedtype.NamedType('policyLanguage', univ.ObjectIdentifier()),
|
|
31
|
+
namedtype.OptionalNamedType('policy', univ.OctetString())
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class ProxyCertInfoExtension(univ.Sequence):
|
|
36
|
+
componentType = namedtype.NamedTypes(
|
|
37
|
+
namedtype.OptionalNamedType('pCPathLenConstraint',
|
|
38
|
+
ProxyCertPathLengthConstraint()),
|
|
39
|
+
namedtype.NamedType('proxyPolicy', ProxyPolicy())
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
id_pkix = univ.ObjectIdentifier((1, 3, 6, 1, 5, 5, 7, ))
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
id_pe = id_pkix + (1, )
|
|
47
|
+
|
|
48
|
+
id_pe_proxyCertInfo = id_pe + (14, )
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
id_ppl = id_pkix + (21, )
|
|
52
|
+
|
|
53
|
+
id_ppl_anyLanguage = id_ppl + (0, )
|
|
54
|
+
|
|
55
|
+
id_ppl_inheritAll = id_ppl + (1, )
|
|
56
|
+
|
|
57
|
+
id_ppl_independent = id_ppl + (2, )
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
# Update the Certificate Extensions Map
|
|
61
|
+
|
|
62
|
+
_certificateExtensionsMapUpdate = {
|
|
63
|
+
id_pe_proxyCertInfo: ProxyCertInfoExtension(),
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
certificateExtensionsMap.update(_certificateExtensionsMapUpdate)
|