aboutsummaryrefslogtreecommitdiff
path: root/pyasn1_modules
diff options
context:
space:
mode:
authorIlya Etingof <etingof@gmail.com>2019-04-25 08:36:39 +0200
committerIlya Etingof <etingof@gmail.com>2019-04-25 08:36:39 +0200
commit3d59f9af2158b2acd63dd213dad427f8e17dec16 (patch)
treecd47974029b23f69d8d2997cb818d8b770507265 /pyasn1_modules
parent96bde16ef7049ac675189ab41d0bbb7982d732cf (diff)
downloadpyasn1-modules-3d59f9af2158b2acd63dd213dad427f8e17dec16.tar.gz
PEP8 latest additions
Diffstat (limited to 'pyasn1_modules')
-rw-r--r--pyasn1_modules/rfc2986.py10
-rw-r--r--pyasn1_modules/rfc3560.py11
-rw-r--r--pyasn1_modules/rfc3779.py22
-rw-r--r--pyasn1_modules/rfc4055.py111
-rw-r--r--pyasn1_modules/rfc4108.py58
-rw-r--r--pyasn1_modules/rfc5083.py6
-rw-r--r--pyasn1_modules/rfc5084.py13
-rw-r--r--pyasn1_modules/rfc5958.py14
-rw-r--r--pyasn1_modules/rfc6019.py6
-rw-r--r--pyasn1_modules/rfc8103.py6
-rw-r--r--pyasn1_modules/rfc8226.py35
-rw-r--r--pyasn1_modules/rfc8410.py4
-rw-r--r--pyasn1_modules/rfc8418.py1
13 files changed, 159 insertions, 138 deletions
diff --git a/pyasn1_modules/rfc2986.py b/pyasn1_modules/rfc2986.py
index 014f2cb..18a9715 100644
--- a/pyasn1_modules/rfc2986.py
+++ b/pyasn1_modules/rfc2986.py
@@ -11,14 +11,11 @@
# ASN.1 source from:
# http://www.ietf.org/rfc/rfc2986.txt
#
-from pyasn1.type import univ
-from pyasn1.type import char
+from pyasn1.type import constraint
from pyasn1.type import namedtype
-from pyasn1.type import namedval
from pyasn1.type import opentype
from pyasn1.type import tag
-from pyasn1.type import constraint
-from pyasn1.type import useful
+from pyasn1.type import univ
MAX = float('inf')
@@ -109,7 +106,8 @@ CertificationRequestInfo.componentType = namedtype.NamedTypes(
namedtype.NamedType('version', univ.Integer()),
namedtype.NamedType('subject', Name()),
namedtype.NamedType('subjectPKInfo', SubjectPublicKeyInfo()),
- namedtype.NamedType('attributes', Attributes().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0)))
+ namedtype.NamedType('attributes',
+ Attributes().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0)))
)
diff --git a/pyasn1_modules/rfc3560.py b/pyasn1_modules/rfc3560.py
index fedb42c..8365436 100644
--- a/pyasn1_modules/rfc3560.py
+++ b/pyasn1_modules/rfc3560.py
@@ -16,10 +16,8 @@
# https://www.rfc-editor.org/rfc/rfc3560.txt
#
-from pyasn1.type import univ, char, namedtype, namedval, tag, constraint, useful
from pyasn1_modules import rfc4055
-
id_sha1 = rfc4055.id_sha1
id_sha256 = rfc4055.id_sha256
@@ -28,18 +26,14 @@ id_sha384 = rfc4055.id_sha384
id_sha512 = rfc4055.id_sha512
-
id_mgf1 = rfc4055.id_mgf1
-
rsaEncryption = rfc4055.rsaEncryption
id_RSAES_OAEP = rfc4055.id_RSAES_OAEP
-
id_pSpecified = rfc4055.id_pSpecified
-
sha1Identifier = rfc4055.sha1Identifier
sha256Identifier = rfc4055.sha256Identifier
@@ -48,7 +42,6 @@ sha384Identifier = rfc4055.sha384Identifier
sha512Identifier = rfc4055.sha512Identifier
-
mgf1SHA1Identifier = rfc4055.mgf1SHA1Identifier
mgf1SHA256Identifier = rfc4055.mgf1SHA256Identifier
@@ -57,7 +50,6 @@ mgf1SHA384Identifier = rfc4055.mgf1SHA384Identifier
mgf1SHA512Identifier = rfc4055.mgf1SHA512Identifier
-
pSpecifiedEmptyIdentifier = rfc4055.pSpecifiedEmptyIdentifier
@@ -69,17 +61,14 @@ rSAES_OAEP_Default_Params = RSAES_OAEP_params()
rSAES_OAEP_Default_Identifier = rfc4055.rSAES_OAEP_Default_Identifier
-
rSAES_OAEP_SHA256_Params = rfc4055.rSAES_OAEP_SHA256_Params
rSAES_OAEP_SHA256_Identifier = rfc4055.rSAES_OAEP_SHA256_Identifier
-
rSAES_OAEP_SHA384_Params = rfc4055.rSAES_OAEP_SHA384_Params
rSAES_OAEP_SHA384_Identifier = rfc4055.rSAES_OAEP_SHA384_Identifier
-
rSAES_OAEP_SHA512_Params = rfc4055.rSAES_OAEP_SHA512_Params
rSAES_OAEP_SHA512_Identifier = rfc4055.rSAES_OAEP_SHA512_Identifier
diff --git a/pyasn1_modules/rfc3779.py b/pyasn1_modules/rfc3779.py
index aaf856e..b4dd994 100644
--- a/pyasn1_modules/rfc3779.py
+++ b/pyasn1_modules/rfc3779.py
@@ -13,8 +13,10 @@
#
-from pyasn1.type import univ, char, namedtype, namedval, tag, constraint, useful
-
+from pyasn1.type import constraint
+from pyasn1.type import namedtype
+from pyasn1.type import tag
+from pyasn1.type import univ
# IP Address Delegation Extension
@@ -28,6 +30,7 @@ class IPAddress(univ.BitString):
class IPAddressRange(univ.Sequence):
pass
+
IPAddressRange.componentType = namedtype.NamedTypes(
namedtype.NamedType('min', IPAddress()),
namedtype.NamedType('max', IPAddress())
@@ -37,6 +40,7 @@ IPAddressRange.componentType = namedtype.NamedTypes(
class IPAddressOrRange(univ.Choice):
pass
+
IPAddressOrRange.componentType = namedtype.NamedTypes(
namedtype.NamedType('addressPrefix', IPAddress()),
namedtype.NamedType('addressRange', IPAddressRange())
@@ -46,6 +50,7 @@ IPAddressOrRange.componentType = namedtype.NamedTypes(
class IPAddressChoice(univ.Choice):
pass
+
IPAddressChoice.componentType = namedtype.NamedTypes(
namedtype.NamedType('inherit', univ.Null()),
namedtype.NamedType('addressesOrRanges', univ.SequenceOf(componentType=IPAddressOrRange()))
@@ -55,6 +60,7 @@ IPAddressChoice.componentType = namedtype.NamedTypes(
class IPAddressFamily(univ.Sequence):
pass
+
IPAddressFamily.componentType = namedtype.NamedTypes(
namedtype.NamedType('addressFamily', univ.OctetString().subtype(subtypeSpec=constraint.ValueSizeConstraint(2, 3))),
namedtype.NamedType('ipAddressChoice', IPAddressChoice())
@@ -64,8 +70,8 @@ IPAddressFamily.componentType = namedtype.NamedTypes(
class IPAddrBlocks(univ.SequenceOf):
pass
-IPAddrBlocks.componentType = IPAddressFamily()
+IPAddrBlocks.componentType = IPAddressFamily()
# Autonomous System Identifier Delegation Extension
@@ -79,6 +85,7 @@ class ASId(univ.Integer):
class ASRange(univ.Sequence):
pass
+
ASRange.componentType = namedtype.NamedTypes(
namedtype.NamedType('min', ASId()),
namedtype.NamedType('max', ASId())
@@ -88,6 +95,7 @@ ASRange.componentType = namedtype.NamedTypes(
class ASIdOrRange(univ.Choice):
pass
+
ASIdOrRange.componentType = namedtype.NamedTypes(
namedtype.NamedType('id', ASId()),
namedtype.NamedType('range', ASRange())
@@ -97,6 +105,7 @@ ASIdOrRange.componentType = namedtype.NamedTypes(
class ASIdentifierChoice(univ.Choice):
pass
+
ASIdentifierChoice.componentType = namedtype.NamedTypes(
namedtype.NamedType('inherit', univ.Null()),
namedtype.NamedType('asIdsOrRanges', univ.SequenceOf(componentType=ASIdOrRange()))
@@ -106,7 +115,10 @@ ASIdentifierChoice.componentType = namedtype.NamedTypes(
class ASIdentifiers(univ.Sequence):
pass
+
ASIdentifiers.componentType = namedtype.NamedTypes(
- namedtype.OptionalNamedType('asnum', ASIdentifierChoice().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0))),
- namedtype.OptionalNamedType('rdi', ASIdentifierChoice().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 1)))
+ namedtype.OptionalNamedType('asnum', ASIdentifierChoice().subtype(
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0))),
+ namedtype.OptionalNamedType('rdi', ASIdentifierChoice().subtype(
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 1)))
)
diff --git a/pyasn1_modules/rfc4055.py b/pyasn1_modules/rfc4055.py
index 02820e7..45f00ed 100644
--- a/pyasn1_modules/rfc4055.py
+++ b/pyasn1_modules/rfc4055.py
@@ -14,7 +14,10 @@
# https://www.rfc-editor.org/rfc/rfc4055.txt
#
-from pyasn1.type import univ, char, namedtype, namedval, tag, constraint, useful
+from pyasn1.type import namedtype
+from pyasn1.type import tag
+from pyasn1.type import univ
+
from pyasn1_modules import rfc5280
@@ -30,96 +33,72 @@ def _OID(*components):
id_sha1 = _OID(1, 3, 14, 3, 2, 26)
-
id_sha256 = _OID(2, 16, 840, 1, 101, 3, 4, 2, 1)
-
id_sha384 = _OID(2, 16, 840, 1, 101, 3, 4, 2, 2)
-
id_sha512 = _OID(2, 16, 840, 1, 101, 3, 4, 2, 3)
-
id_sha224 = _OID(2, 16, 840, 1, 101, 3, 4, 2, 4)
-
rsaEncryption = _OID(1, 2, 840, 113549, 1, 1, 1)
-
id_mgf1 = _OID(1, 2, 840, 113549, 1, 1, 8)
-
id_RSAES_OAEP = _OID(1, 2, 840, 113549, 1, 1, 7)
-
id_pSpecified = _OID(1, 2, 840, 113549, 1, 1, 9)
-
id_RSASSA_PSS = _OID(1, 2, 840, 113549, 1, 1, 10)
-
sha256WithRSAEncryption = _OID(1, 2, 840, 113549, 1, 1, 11)
-
sha384WithRSAEncryption = _OID(1, 2, 840, 113549, 1, 1, 12)
-
sha512WithRSAEncryption = _OID(1, 2, 840, 113549, 1, 1, 13)
-
sha224WithRSAEncryption = _OID(1, 2, 840, 113549, 1, 1, 14)
-
sha1Identifier = rfc5280.AlgorithmIdentifier()
sha1Identifier['algorithm'] = id_sha1
sha1Identifier['parameters'] = univ.Null("")
-
sha224Identifier = rfc5280.AlgorithmIdentifier()
sha224Identifier['algorithm'] = id_sha224
sha224Identifier['parameters'] = univ.Null("")
-
sha256Identifier = rfc5280.AlgorithmIdentifier()
sha256Identifier['algorithm'] = id_sha256
sha256Identifier['parameters'] = univ.Null("")
-
sha384Identifier = rfc5280.AlgorithmIdentifier()
sha384Identifier['algorithm'] = id_sha384
sha384Identifier['parameters'] = univ.Null("")
-
sha512Identifier = rfc5280.AlgorithmIdentifier()
sha512Identifier['algorithm'] = id_sha512
sha512Identifier['parameters'] = univ.Null("")
-
mgf1SHA1Identifier = rfc5280.AlgorithmIdentifier()
mgf1SHA1Identifier['algorithm'] = id_mgf1
mgf1SHA1Identifier['parameters'] = sha1Identifier
-
mgf1SHA224Identifier = rfc5280.AlgorithmIdentifier()
mgf1SHA224Identifier['algorithm'] = id_mgf1
mgf1SHA224Identifier['parameters'] = sha224Identifier
-
mgf1SHA256Identifier = rfc5280.AlgorithmIdentifier()
mgf1SHA256Identifier['algorithm'] = id_mgf1
mgf1SHA256Identifier['parameters'] = sha256Identifier
-
mgf1SHA384Identifier = rfc5280.AlgorithmIdentifier()
mgf1SHA384Identifier['algorithm'] = id_mgf1
mgf1SHA384Identifier['parameters'] = sha384Identifier
-
mgf1SHA512Identifier = rfc5280.AlgorithmIdentifier()
mgf1SHA512Identifier['algorithm'] = id_mgf1
mgf1SHA512Identifier['parameters'] = sha512Identifier
-
pSpecifiedEmptyIdentifier = rfc5280.AlgorithmIdentifier()
pSpecifiedEmptyIdentifier['algorithm'] = id_pSpecified
pSpecifiedEmptyIdentifier['parameters'] = univ.OctetString(value='')
@@ -128,6 +107,7 @@ pSpecifiedEmptyIdentifier['parameters'] = univ.OctetString(value='')
class RSAPublicKey(univ.Sequence):
pass
+
RSAPublicKey.componentType = namedtype.NamedTypes(
namedtype.NamedType('modulus', univ.Integer()),
namedtype.NamedType('publicExponent', univ.Integer())
@@ -145,50 +125,57 @@ class MaskGenAlgorithm(rfc5280.AlgorithmIdentifier):
class RSAES_OAEP_params(univ.Sequence):
pass
+
RSAES_OAEP_params.componentType = namedtype.NamedTypes(
- namedtype.OptionalNamedType('hashFunc', rfc5280.AlgorithmIdentifier().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0))),
- namedtype.OptionalNamedType('maskGenFunc', rfc5280.AlgorithmIdentifier().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 1))),
- namedtype.OptionalNamedType('pSourceFunc', rfc5280.AlgorithmIdentifier().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 2)))
+ namedtype.OptionalNamedType('hashFunc', rfc5280.AlgorithmIdentifier().subtype(
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0))),
+ namedtype.OptionalNamedType('maskGenFunc', rfc5280.AlgorithmIdentifier().subtype(
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 1))),
+ namedtype.OptionalNamedType('pSourceFunc', rfc5280.AlgorithmIdentifier().subtype(
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 2)))
)
-
rSAES_OAEP_Default_Params = RSAES_OAEP_params()
rSAES_OAEP_Default_Identifier = rfc5280.AlgorithmIdentifier()
rSAES_OAEP_Default_Identifier['algorithm'] = id_RSAES_OAEP
rSAES_OAEP_Default_Identifier['parameters'] = rSAES_OAEP_Default_Params
-
rSAES_OAEP_SHA224_Params = RSAES_OAEP_params()
-rSAES_OAEP_SHA224_Params['hashFunc'] = sha224Identifier.subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0), cloneValueFlag=True)
-rSAES_OAEP_SHA224_Params['maskGenFunc'] = mgf1SHA224Identifier.subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 1), cloneValueFlag=True)
+rSAES_OAEP_SHA224_Params['hashFunc'] = sha224Identifier.subtype(
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0), cloneValueFlag=True)
+rSAES_OAEP_SHA224_Params['maskGenFunc'] = mgf1SHA224Identifier.subtype(
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 1), cloneValueFlag=True)
rSAES_OAEP_SHA224_Identifier = rfc5280.AlgorithmIdentifier()
rSAES_OAEP_SHA224_Identifier['algorithm'] = id_RSAES_OAEP
rSAES_OAEP_SHA224_Identifier['parameters'] = rSAES_OAEP_SHA224_Params
-
rSAES_OAEP_SHA256_Params = RSAES_OAEP_params()
-rSAES_OAEP_SHA256_Params['hashFunc'] = sha256Identifier.subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0), cloneValueFlag=True)
-rSAES_OAEP_SHA256_Params['maskGenFunc'] = mgf1SHA256Identifier.subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 1), cloneValueFlag=True)
+rSAES_OAEP_SHA256_Params['hashFunc'] = sha256Identifier.subtype(
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0), cloneValueFlag=True)
+rSAES_OAEP_SHA256_Params['maskGenFunc'] = mgf1SHA256Identifier.subtype(
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 1), cloneValueFlag=True)
rSAES_OAEP_SHA256_Identifier = rfc5280.AlgorithmIdentifier()
rSAES_OAEP_SHA256_Identifier['algorithm'] = id_RSAES_OAEP
rSAES_OAEP_SHA256_Identifier['parameters'] = rSAES_OAEP_SHA256_Params
-
rSAES_OAEP_SHA384_Params = RSAES_OAEP_params()
-rSAES_OAEP_SHA384_Params['hashFunc'] = sha384Identifier.subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0), cloneValueFlag=True)
-rSAES_OAEP_SHA384_Params['maskGenFunc'] = mgf1SHA384Identifier.subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 1), cloneValueFlag=True)
+rSAES_OAEP_SHA384_Params['hashFunc'] = sha384Identifier.subtype(
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0), cloneValueFlag=True)
+rSAES_OAEP_SHA384_Params['maskGenFunc'] = mgf1SHA384Identifier.subtype(
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 1), cloneValueFlag=True)
rSAES_OAEP_SHA384_Identifier = rfc5280.AlgorithmIdentifier()
rSAES_OAEP_SHA384_Identifier['algorithm'] = id_RSAES_OAEP
rSAES_OAEP_SHA384_Identifier['parameters'] = rSAES_OAEP_SHA384_Params
-
rSAES_OAEP_SHA512_Params = RSAES_OAEP_params()
-rSAES_OAEP_SHA512_Params['hashFunc'] = sha512Identifier.subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0), cloneValueFlag=True)
-rSAES_OAEP_SHA512_Params['maskGenFunc'] = mgf1SHA512Identifier.subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 1), cloneValueFlag=True)
+rSAES_OAEP_SHA512_Params['hashFunc'] = sha512Identifier.subtype(
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0), cloneValueFlag=True)
+rSAES_OAEP_SHA512_Params['maskGenFunc'] = mgf1SHA512Identifier.subtype(
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 1), cloneValueFlag=True)
rSAES_OAEP_SHA512_Identifier = rfc5280.AlgorithmIdentifier()
rSAES_OAEP_SHA512_Identifier['algorithm'] = id_RSAES_OAEP
@@ -198,51 +185,59 @@ rSAES_OAEP_SHA512_Identifier['parameters'] = rSAES_OAEP_SHA512_Params
class RSASSA_PSS_params(univ.Sequence):
pass
+
RSASSA_PSS_params.componentType = namedtype.NamedTypes(
- namedtype.OptionalNamedType('hashAlgorithm', rfc5280.AlgorithmIdentifier().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0))),
- namedtype.OptionalNamedType('maskGenAlgorithm', rfc5280.AlgorithmIdentifier().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 1))),
- namedtype.DefaultedNamedType('saltLength', univ.Integer(value=20).subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 2))),
- namedtype.DefaultedNamedType('trailerField', univ.Integer(value=1).subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 3)))
+ namedtype.OptionalNamedType('hashAlgorithm', rfc5280.AlgorithmIdentifier().subtype(
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0))),
+ namedtype.OptionalNamedType('maskGenAlgorithm', rfc5280.AlgorithmIdentifier().subtype(
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 1))),
+ namedtype.DefaultedNamedType('saltLength', univ.Integer(value=20).subtype(
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 2))),
+ namedtype.DefaultedNamedType('trailerField', univ.Integer(value=1).subtype(
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 3)))
)
-
rSASSA_PSS_Default_Params = RSASSA_PSS_params()
rSASSA_PSS_Default_Identifier = rfc5280.AlgorithmIdentifier()
rSASSA_PSS_Default_Identifier['algorithm'] = id_RSASSA_PSS
rSASSA_PSS_Default_Identifier['parameters'] = rSASSA_PSS_Default_Params
-
rSASSA_PSS_SHA224_Params = RSASSA_PSS_params()
-rSASSA_PSS_SHA224_Params['hashAlgorithm'] = sha224Identifier.subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0), cloneValueFlag=True)
-rSASSA_PSS_SHA224_Params['maskGenAlgorithm'] = mgf1SHA224Identifier.subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 1), cloneValueFlag=True)
+rSASSA_PSS_SHA224_Params['hashAlgorithm'] = sha224Identifier.subtype(
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0), cloneValueFlag=True)
+rSASSA_PSS_SHA224_Params['maskGenAlgorithm'] = mgf1SHA224Identifier.subtype(
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 1), cloneValueFlag=True)
rSASSA_PSS_SHA224_Identifier = rfc5280.AlgorithmIdentifier()
rSASSA_PSS_SHA224_Identifier['algorithm'] = id_RSASSA_PSS
rSASSA_PSS_SHA224_Identifier['parameters'] = rSASSA_PSS_SHA224_Params
-
rSASSA_PSS_SHA256_Params = RSASSA_PSS_params()
-rSASSA_PSS_SHA256_Params['hashAlgorithm'] = sha256Identifier.subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0), cloneValueFlag=True)
-rSASSA_PSS_SHA256_Params['maskGenAlgorithm'] = mgf1SHA256Identifier.subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 1), cloneValueFlag=True)
+rSASSA_PSS_SHA256_Params['hashAlgorithm'] = sha256Identifier.subtype(
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0), cloneValueFlag=True)
+rSASSA_PSS_SHA256_Params['maskGenAlgorithm'] = mgf1SHA256Identifier.subtype(
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 1), cloneValueFlag=True)
rSASSA_PSS_SHA256_Identifier = rfc5280.AlgorithmIdentifier()
rSASSA_PSS_SHA256_Identifier['algorithm'] = id_RSASSA_PSS
rSASSA_PSS_SHA256_Identifier['parameters'] = rSASSA_PSS_SHA256_Params
-
rSASSA_PSS_SHA384_Params = RSASSA_PSS_params()
-rSASSA_PSS_SHA384_Params['hashAlgorithm'] = sha384Identifier.subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0), cloneValueFlag=True)
-rSASSA_PSS_SHA384_Params['maskGenAlgorithm'] = mgf1SHA384Identifier.subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 1), cloneValueFlag=True)
+rSASSA_PSS_SHA384_Params['hashAlgorithm'] = sha384Identifier.subtype(
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0), cloneValueFlag=True)
+rSASSA_PSS_SHA384_Params['maskGenAlgorithm'] = mgf1SHA384Identifier.subtype(
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 1), cloneValueFlag=True)
rSASSA_PSS_SHA384_Identifier = rfc5280.AlgorithmIdentifier()
rSASSA_PSS_SHA384_Identifier['algorithm'] = id_RSASSA_PSS
rSASSA_PSS_SHA384_Identifier['parameters'] = rSASSA_PSS_SHA384_Params
-
rSASSA_PSS_SHA512_Params = RSASSA_PSS_params()
-rSASSA_PSS_SHA512_Params['hashAlgorithm'] = sha512Identifier.subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0), cloneValueFlag=True)
-rSASSA_PSS_SHA512_Params['maskGenAlgorithm'] = mgf1SHA512Identifier.subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 1), cloneValueFlag=True)
+rSASSA_PSS_SHA512_Params['hashAlgorithm'] = sha512Identifier.subtype(
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0), cloneValueFlag=True)
+rSASSA_PSS_SHA512_Params['maskGenAlgorithm'] = mgf1SHA512Identifier.subtype(
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 1), cloneValueFlag=True)
rSASSA_PSS_SHA512_Identifier = rfc5280.AlgorithmIdentifier()
rSASSA_PSS_SHA512_Identifier['algorithm'] = id_RSASSA_PSS
diff --git a/pyasn1_modules/rfc4108.py b/pyasn1_modules/rfc4108.py
index 9a7f190..243f1fb 100644
--- a/pyasn1_modules/rfc4108.py
+++ b/pyasn1_modules/rfc4108.py
@@ -13,7 +13,11 @@
#
-from pyasn1.type import univ, char, namedtype, namedval, tag, constraint, useful
+from pyasn1.type import constraint
+from pyasn1.type import namedtype
+from pyasn1.type import namedval
+from pyasn1.type import tag
+from pyasn1.type import univ
from pyasn1_modules import rfc5652
@@ -23,6 +27,7 @@ MAX = float('inf')
class HardwareSerialEntry(univ.Choice):
pass
+
HardwareSerialEntry.componentType = namedtype.NamedTypes(
namedtype.NamedType('all', univ.Null()),
namedtype.NamedType('single', univ.OctetString()),
@@ -30,13 +35,14 @@ HardwareSerialEntry.componentType = namedtype.NamedTypes(
namedtype.NamedType('low', univ.OctetString()),
namedtype.NamedType('high', univ.OctetString())
))
- )
+ )
)
class HardwareModules(univ.Sequence):
pass
+
HardwareModules.componentType = namedtype.NamedTypes(
namedtype.NamedType('hwType', univ.ObjectIdentifier()),
namedtype.NamedType('hwSerialEntries', univ.SequenceOf(componentType=HardwareSerialEntry()))
@@ -46,16 +52,17 @@ HardwareModules.componentType = namedtype.NamedTypes(
class CommunityIdentifier(univ.Choice):
pass
+
CommunityIdentifier.componentType = namedtype.NamedTypes(
namedtype.NamedType('communityOID', univ.ObjectIdentifier()),
namedtype.NamedType('hwModuleList', HardwareModules())
)
-
class PreferredPackageIdentifier(univ.Sequence):
pass
+
PreferredPackageIdentifier.componentType = namedtype.NamedTypes(
namedtype.NamedType('fwPkgID', univ.ObjectIdentifier()),
namedtype.NamedType('verNum', univ.Integer().subtype(subtypeSpec=constraint.ValueRangeConstraint(0, MAX)))
@@ -65,6 +72,7 @@ PreferredPackageIdentifier.componentType = namedtype.NamedTypes(
class PreferredOrLegacyPackageIdentifier(univ.Choice):
pass
+
PreferredOrLegacyPackageIdentifier.componentType = namedtype.NamedTypes(
namedtype.NamedType('preferred', PreferredPackageIdentifier()),
namedtype.NamedType('legacy', univ.OctetString())
@@ -74,6 +82,7 @@ PreferredOrLegacyPackageIdentifier.componentType = namedtype.NamedTypes(
class CurrentFWConfig(univ.Sequence):
pass
+
CurrentFWConfig.componentType = namedtype.NamedTypes(
namedtype.OptionalNamedType('fwPkgType', univ.Integer()),
namedtype.NamedType('fwPkgName', PreferredOrLegacyPackageIdentifier())
@@ -83,8 +92,10 @@ CurrentFWConfig.componentType = namedtype.NamedTypes(
class PreferredOrLegacyStalePackageIdentifier(univ.Choice):
pass
+
PreferredOrLegacyStalePackageIdentifier.componentType = namedtype.NamedTypes(
- namedtype.NamedType('preferredStaleVerNum', univ.Integer().subtype(subtypeSpec=constraint.ValueRangeConstraint(0, MAX))),
+ namedtype.NamedType('preferredStaleVerNum',
+ univ.Integer().subtype(subtypeSpec=constraint.ValueRangeConstraint(0, MAX))),
namedtype.NamedType('legacyStaleVersion', univ.OctetString())
)
@@ -92,6 +103,7 @@ PreferredOrLegacyStalePackageIdentifier.componentType = namedtype.NamedTypes(
class FirmwarePackageLoadErrorCode(univ.Enumerated):
pass
+
FirmwarePackageLoadErrorCode.namedValues = namedval.NamedValues(
('decodeFailure', 1),
('badContentInfo', 2),
@@ -137,11 +149,11 @@ class VendorLoadErrorCode(univ.Integer):
pass
-
# Wrapped Firmware Key Unsigned Attribute and Object Identifiers
id_aa_wrappedFirmwareKey = univ.ObjectIdentifier('1.2.840.113549.1.9.16.2.39')
+
class WrappedFirmwareKey(rfc5652.EnvelopedData):
pass
@@ -150,9 +162,11 @@ class WrappedFirmwareKey(rfc5652.EnvelopedData):
id_aa_firmwarePackageInfo = univ.ObjectIdentifier('1.2.840.113549.1.9.16.2.42')
+
class FirmwarePackageInfo(univ.Sequence):
pass
+
FirmwarePackageInfo.componentType = namedtype.NamedTypes(
namedtype.OptionalNamedType('fwPkgType', univ.Integer()),
namedtype.OptionalNamedType('dependencies', univ.SequenceOf(componentType=PreferredOrLegacyPackageIdentifier()))
@@ -160,41 +174,44 @@ FirmwarePackageInfo.componentType = namedtype.NamedTypes(
FirmwarePackageInfo.sizeSpec = univ.Sequence.sizeSpec + constraint.ValueSizeConstraint(1, 2)
-
# Community Identifiers Signed Attribute and Object Identifier
id_aa_communityIdentifiers = univ.ObjectIdentifier('1.2.840.113549.1.9.16.2.40')
+
class CommunityIdentifiers(univ.SequenceOf):
pass
-CommunityIdentifiers.componentType = CommunityIdentifier()
+CommunityIdentifiers.componentType = CommunityIdentifier()
# Implemented Compression Algorithms Signed Attribute and Object Identifier
id_aa_implCompressAlgs = univ.ObjectIdentifier('1.2.840.113549.1.9.16.2.43')
+
class ImplementedCompressAlgorithms(univ.SequenceOf):
pass
-ImplementedCompressAlgorithms.componentType = univ.ObjectIdentifier()
+ImplementedCompressAlgorithms.componentType = univ.ObjectIdentifier()
# Implemented Cryptographic Algorithms Signed Attribute and Object Identifier
id_aa_implCryptoAlgs = univ.ObjectIdentifier('1.2.840.113549.1.9.16.2.38')
+
class ImplementedCryptoAlgorithms(univ.SequenceOf):
pass
-ImplementedCryptoAlgorithms.componentType = univ.ObjectIdentifier()
+ImplementedCryptoAlgorithms.componentType = univ.ObjectIdentifier()
# Decrypt Key Identifier Signed Attribute and Object Identifier
id_aa_decryptKeyID = univ.ObjectIdentifier('1.2.840.113549.1.9.16.2.37')
+
class DecryptKeyIdentifier(univ.OctetString):
pass
@@ -203,19 +220,22 @@ class DecryptKeyIdentifier(univ.OctetString):
id_aa_targetHardwareIDs = univ.ObjectIdentifier('1.2.840.113549.1.9.16.2.36')
+
class TargetHardwareIdentifiers(univ.SequenceOf):
pass
-TargetHardwareIdentifiers.componentType = univ.ObjectIdentifier()
+TargetHardwareIdentifiers.componentType = univ.ObjectIdentifier()
# Firmware Package Identifier Signed Attribute and Object Identifier
id_aa_firmwarePackageID = univ.ObjectIdentifier('1.2.840.113549.1.9.16.2.35')
+
class FirmwarePackageIdentifier(univ.Sequence):
pass
+
FirmwarePackageIdentifier.componentType = namedtype.NamedTypes(
namedtype.NamedType('name', PreferredOrLegacyPackageIdentifier()),
namedtype.OptionalNamedType('stale', PreferredOrLegacyStalePackageIdentifier())
@@ -227,16 +247,18 @@ FirmwarePackageIdentifier.componentType = namedtype.NamedTypes(
class FWErrorVersion(univ.Integer):
pass
+
FWErrorVersion.namedValues = namedval.NamedValues(
('v1', 1)
)
-
id_ct_firmwareLoadError = univ.ObjectIdentifier('1.2.840.113549.1.9.16.1.18')
+
class FirmwarePackageLoadError(univ.Sequence):
pass
+
FirmwarePackageLoadError.componentType = namedtype.NamedTypes(
namedtype.DefaultedNamedType('version', FWErrorVersion().subtype(value='v1')),
namedtype.NamedType('hwType', univ.ObjectIdentifier()),
@@ -244,7 +266,8 @@ FirmwarePackageLoadError.componentType = namedtype.NamedTypes(
namedtype.NamedType('errorCode', FirmwarePackageLoadErrorCode()),
namedtype.OptionalNamedType('vendorErrorCode', VendorLoadErrorCode()),
namedtype.OptionalNamedType('fwPkgName', PreferredOrLegacyPackageIdentifier()),
- namedtype.OptionalNamedType('config', univ.SequenceOf(componentType=CurrentFWConfig()).subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1)))
+ namedtype.OptionalNamedType('config', univ.SequenceOf(componentType=CurrentFWConfig()).subtype(
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1)))
)
@@ -253,30 +276,33 @@ FirmwarePackageLoadError.componentType = namedtype.NamedTypes(
class FWReceiptVersion(univ.Integer):
pass
+
FWReceiptVersion.namedValues = namedval.NamedValues(
('v1', 1)
)
-
id_ct_firmwareLoadReceipt = univ.ObjectIdentifier('1.2.840.113549.1.9.16.1.17')
+
class FirmwarePackageLoadReceipt(univ.Sequence):
pass
+
FirmwarePackageLoadReceipt.componentType = namedtype.NamedTypes(
namedtype.DefaultedNamedType('version', FWReceiptVersion().subtype(value='v1')),
namedtype.NamedType('hwType', univ.ObjectIdentifier()),
namedtype.NamedType('hwSerialNum', univ.OctetString()),
namedtype.NamedType('fwPkgName', PreferredOrLegacyPackageIdentifier()),
namedtype.OptionalNamedType('trustAnchorKeyID', univ.OctetString()),
- namedtype.OptionalNamedType('decryptKeyID', univ.OctetString().subtype(implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1)))
+ namedtype.OptionalNamedType('decryptKeyID', univ.OctetString().subtype(
+ implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1)))
)
-
# Firmware Package Content Type and Object Identifier
id_ct_firmwarePackage = univ.ObjectIdentifier('1.2.840.113549.1.9.16.1.16')
+
class FirmwarePkgData(univ.OctetString):
pass
@@ -285,9 +311,11 @@ class FirmwarePkgData(univ.OctetString):
id_on_hardwareModuleName = univ.ObjectIdentifier('1.3.6.1.5.5.7.8.4')
+
class HardwareModuleName(univ.Sequence):
pass
+
HardwareModuleName.componentType = namedtype.NamedTypes(
namedtype.NamedType('hwType', univ.ObjectIdentifier()),
namedtype.NamedType('hwSerialNum', univ.OctetString())
diff --git a/pyasn1_modules/rfc5083.py b/pyasn1_modules/rfc5083.py
index 5240aaa..d3a7f62 100644
--- a/pyasn1_modules/rfc5083.py
+++ b/pyasn1_modules/rfc5083.py
@@ -9,9 +9,11 @@
# ASN.1 source from:
# https://www.rfc-editor.org/rfc/rfc5083.txt
-from pyasn1.type import namedtype, tag, univ
-from pyasn1_modules import rfc5652
+from pyasn1.type import namedtype
+from pyasn1.type import tag
+from pyasn1.type import univ
+from pyasn1_modules import rfc5652
MAX = float('inf')
diff --git a/pyasn1_modules/rfc5084.py b/pyasn1_modules/rfc5084.py
index 99ce60d..18abec8 100644
--- a/pyasn1_modules/rfc5084.py
+++ b/pyasn1_modules/rfc5084.py
@@ -12,8 +12,9 @@
# ASN.1 source from:
# https://www.rfc-editor.org/rfc/rfc5084.txt
-
-from pyasn1.type import univ, char, namedtype, namedval, tag, constraint, useful
+from pyasn1.type import constraint
+from pyasn1.type import namedtype
+from pyasn1.type import univ
def _OID(*components):
@@ -37,7 +38,6 @@ class AES_GCM_ICVlen(univ.Integer):
AES_CCM_ICVlen.subtypeSpec = constraint.SingleValueConstraint(4, 6, 8, 10, 12, 14, 16)
-
AES_GCM_ICVlen.subtypeSpec = constraint.ValueRangeConstraint(12, 16)
@@ -65,23 +65,16 @@ GCMParameters.componentType = namedtype.NamedTypes(
namedtype.DefaultedNamedType('aes-ICVlen', AES_GCM_ICVlen().subtype(value=12))
)
-
aes = _OID(2, 16, 840, 1, 101, 3, 4, 1)
-
id_aes128_CCM = _OID(aes, 7)
-
id_aes128_GCM = _OID(aes, 6)
-
id_aes192_CCM = _OID(aes, 27)
-
id_aes192_GCM = _OID(aes, 26)
-
id_aes256_CCM = _OID(aes, 47)
-
id_aes256_GCM = _OID(aes, 46)
diff --git a/pyasn1_modules/rfc5958.py b/pyasn1_modules/rfc5958.py
index 35ea902..20ace16 100644
--- a/pyasn1_modules/rfc5958.py
+++ b/pyasn1_modules/rfc5958.py
@@ -12,11 +12,14 @@
# ASN.1 source from:
# https://www.rfc-editor.org/rfc/rfc8418.txt
-from pyasn1.type import univ, constraint, namedtype, namedval, tag
+from pyasn1.type import constraint
+from pyasn1.type import namedtype
+from pyasn1.type import namedval
+from pyasn1.type import tag
+from pyasn1.type import univ
from pyasn1_modules import rfc5280
-
MAX = float('inf')
@@ -52,7 +55,7 @@ class Attributes(univ.SetOf):
class PublicKey(univ.BitString):
- pass
+ pass
# OneAsymmetricKey is essentially version 2 of PrivateKeyInfo.
@@ -79,9 +82,10 @@ class PrivateKeyInfo(OneAsymmetricKey):
id_ct_KP_aKeyPackage = univ.ObjectIdentifier('2.16.840.1.101.2.1.2.78.5')
+
class AsymmetricKeyPackage(univ.SequenceOf):
pass
+
AsymmetricKeyPackage.componentType = OneAsymmetricKey()
-AsymmetricKeyPackage.subtypeSpec=constraint.ValueSizeConstraint(1, MAX)
-
+AsymmetricKeyPackage.subtypeSpec = constraint.ValueSizeConstraint(1, MAX)
diff --git a/pyasn1_modules/rfc6019.py b/pyasn1_modules/rfc6019.py
index 301c633..9cdf2ab 100644
--- a/pyasn1_modules/rfc6019.py
+++ b/pyasn1_modules/rfc6019.py
@@ -10,7 +10,8 @@
# ASN.1 source from:
# https://www.rfc-editor.org/rfc/rfc6019.txt
-from pyasn1.type import univ, constraint
+from pyasn1.type import constraint
+from pyasn1.type import univ
MAX = float('inf')
@@ -20,12 +21,13 @@ MAX = float('inf')
class BinaryTime(univ.Integer):
pass
-BinaryTime.subtypeSpec = constraint.ValueRangeConstraint(0, MAX)
+BinaryTime.subtypeSpec = constraint.ValueRangeConstraint(0, MAX)
# CMS Attribute for representing signing time in BinaryTime
id_aa_binarySigningTime = univ.ObjectIdentifier('1.2.840.113549.1.9.16.2.46')
+
class BinarySigningTime(BinaryTime):
pass
diff --git a/pyasn1_modules/rfc8103.py b/pyasn1_modules/rfc8103.py
index 5e2d787..6429e86 100644
--- a/pyasn1_modules/rfc8103.py
+++ b/pyasn1_modules/rfc8103.py
@@ -12,7 +12,8 @@
# ASN.1 source from:
# https://www.rfc-editor.org/rfc/rfc8103.txt
-from pyasn1.type import univ, char, namedtype, namedval, tag, constraint, useful
+from pyasn1.type import constraint
+from pyasn1.type import univ
def _OID(*components):
@@ -32,7 +33,4 @@ class AEADChaCha20Poly1305Nonce(univ.OctetString):
AEADChaCha20Poly1305Nonce.subtypeSpec = constraint.ValueSizeConstraint(12, 12)
-
id_alg_AEADChaCha20Poly1305 = _OID(1, 2, 840, 113549, 1, 9, 16, 3, 18)
-
-
diff --git a/pyasn1_modules/rfc8226.py b/pyasn1_modules/rfc8226.py
index cd9bfd1..1f18389 100644
--- a/pyasn1_modules/rfc8226.py
+++ b/pyasn1_modules/rfc8226.py
@@ -11,8 +11,11 @@
# ASN.1 source from:
# https://www.rfc-editor.org/rfc/rfc8226.txt (with errata corrected)
-from pyasn1.type import univ, char, namedtype, namedval, tag, constraint, useful
-
+from pyasn1.type import char
+from pyasn1.type import constraint
+from pyasn1.type import namedtype
+from pyasn1.type import tag
+from pyasn1.type import univ
MAX = float('inf')
@@ -37,7 +40,7 @@ class JWTClaimNames(univ.SequenceOf):
JWTClaimNames.componentType = JWTClaimName()
-JWTClaimNames.subtypeSpec=constraint.ValueSizeConstraint(1, MAX)
+JWTClaimNames.subtypeSpec = constraint.ValueSizeConstraint(1, MAX)
class JWTClaimPermittedValues(univ.Sequence):
@@ -46,7 +49,8 @@ class JWTClaimPermittedValues(univ.Sequence):
JWTClaimPermittedValues.componentType = namedtype.NamedTypes(
namedtype.NamedType('claim', JWTClaimName()),
- namedtype.NamedType('permitted', univ.SequenceOf(componentType=char.UTF8String()).subtype(subtypeSpec=constraint.ValueSizeConstraint(1, MAX)))
+ namedtype.NamedType('permitted', univ.SequenceOf(componentType=char.UTF8String()).subtype(
+ subtypeSpec=constraint.ValueSizeConstraint(1, MAX)))
)
@@ -55,7 +59,7 @@ class JWTClaimPermittedValuesList(univ.SequenceOf):
JWTClaimPermittedValuesList.componentType = JWTClaimPermittedValues()
-JWTClaimPermittedValuesList.subtypeSpec=constraint.ValueSizeConstraint(1, MAX)
+JWTClaimPermittedValuesList.subtypeSpec = constraint.ValueSizeConstraint(1, MAX)
class JWTClaimConstraints(univ.Sequence):
@@ -63,14 +67,14 @@ class JWTClaimConstraints(univ.Sequence):
JWTClaimConstraints.componentType = namedtype.NamedTypes(
- namedtype.OptionalNamedType('mustInclude', JWTClaimNames().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
- namedtype.OptionalNamedType('permittedValues', JWTClaimPermittedValuesList().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1)))
+ namedtype.OptionalNamedType('mustInclude', JWTClaimNames().subtype(
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
+ namedtype.OptionalNamedType('permittedValues', JWTClaimPermittedValuesList().subtype(
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1)))
)
-
JWTClaimConstraints.sizeSpec = univ.Sequence.sizeSpec + constraint.ValueSizeConstraint(1, 2)
-
id_pe_JWTClaimConstraints = _OID(1, 3, 6, 1, 5, 5, 7, 1, 27)
@@ -103,9 +107,12 @@ class TNEntry(univ.Choice):
TNEntry.componentType = namedtype.NamedTypes(
- namedtype.NamedType('spc', ServiceProviderCode().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
- namedtype.NamedType('range', TelephoneNumberRange().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 1))),
- namedtype.NamedType('one', TelephoneNumber().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 2)))
+ namedtype.NamedType('spc', ServiceProviderCode().subtype(
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
+ namedtype.NamedType('range', TelephoneNumberRange().subtype(
+ explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 1))),
+ namedtype.NamedType('one',
+ TelephoneNumber().subtype(explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 2)))
)
@@ -114,10 +121,8 @@ class TNAuthorizationList(univ.SequenceOf):
TNAuthorizationList.componentType = TNEntry()
-TNAuthorizationList.subtypeSpec=constraint.ValueSizeConstraint(1, MAX)
-
+TNAuthorizationList.subtypeSpec = constraint.ValueSizeConstraint(1, MAX)
id_pe_TNAuthList = _OID(1, 3, 6, 1, 5, 5, 7, 1, 26)
-
id_ad_stirTNList = _OID(1, 3, 6, 1, 5, 5, 7, 48, 14)
diff --git a/pyasn1_modules/rfc8410.py b/pyasn1_modules/rfc8410.py
index 7d87c29..98bc97b 100644
--- a/pyasn1_modules/rfc8410.py
+++ b/pyasn1_modules/rfc8410.py
@@ -10,7 +10,6 @@
# ASN.1 source from:
# https://www.rfc-editor.org/rfc/rfc8410.txt
-
from pyasn1.type import univ
from pyasn1_modules import rfc3565
from pyasn1_modules import rfc4055
@@ -33,15 +32,12 @@ id_X25519 = univ.ObjectIdentifier('1.3.101.110')
id_X448 = univ.ObjectIdentifier('1.3.101.111')
-
id_Ed25519 = univ.ObjectIdentifier('1.3.101.112')
id_Ed448 = univ.ObjectIdentifier('1.3.101.113')
-
id_sha512 = rfc4055.id_sha512
-
id_aes128_wrap = rfc3565.id_aes128_wrap
id_aes256_wrap = rfc3565.id_aes256_wrap
diff --git a/pyasn1_modules/rfc8418.py b/pyasn1_modules/rfc8418.py
index 4962f26..6e76487 100644
--- a/pyasn1_modules/rfc8418.py
+++ b/pyasn1_modules/rfc8418.py
@@ -29,7 +29,6 @@ dhSinglePass_stdDH_sha384kdf_scheme = univ.ObjectIdentifier('1.3.133.16.840.63.0
dhSinglePass_stdDH_sha512kdf_scheme = univ.ObjectIdentifier('1.3.133.16.840.63.0.11.3')
-
dhSinglePass_stdDH_hkdf_sha256_scheme = univ.ObjectIdentifier('1.2.840.113549.1.9.16.3.19')
dhSinglePass_stdDH_hkdf_sha384_scheme = univ.ObjectIdentifier('1.2.840.113549.1.9.16.3.20')