__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
# This file is being contributed to of pyasn1-modules software.
#
# Created by Russ Housley without assistance from the asn1ate tool.
# Modified by Russ Housley to add support for opentypes.
#
# Copyright (c) 2019, Vigil Security, LLC
# License: http://snmplabs.com/pyasn1/license.html
#
# CMS Key Package Receipt and Error Content Types
#
# ASN.1 source from:
# https://www.rfc-editor.org/rfc/rfc7191.txt
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 univ
from pyasn1_modules import rfc5280
from pyasn1_modules import rfc5652
MAX = float('inf')
DistinguishedName = rfc5280.DistinguishedName
# SingleAttribute is the same as Attribute in RFC 5652, except that the
# attrValues SET must have one and only one member
class AttributeValue(univ.Any):
pass
class AttributeValues(univ.SetOf):
pass
AttributeValues.componentType = AttributeValue()
AttributeValues.sizeSpec = univ.Set.sizeSpec + constraint.ValueSizeConstraint(1, 1)
class SingleAttribute(univ.Sequence):
pass
SingleAttribute.componentType = namedtype.NamedTypes(
namedtype.NamedType('attrType', univ.ObjectIdentifier()),
namedtype.NamedType('attrValues', AttributeValues(),
openType=opentype.OpenType('attrType', rfc5652.cmsAttributesMap)
)
)
# SIR Entity Name
class SIREntityNameType(univ.ObjectIdentifier):
pass
class SIREntityNameValue(univ.Any):
pass
class SIREntityName(univ.Sequence):
pass
SIREntityName.componentType = namedtype.NamedTypes(
namedtype.NamedType('sirenType', SIREntityNameType()),
namedtype.NamedType('sirenValue', univ.OctetString())
# CONTAINING the DER-encoded SIREntityNameValue
)
class SIREntityNames(univ.SequenceOf):
pass
SIREntityNames.componentType = SIREntityName()
SIREntityNames.sizeSpec=constraint.ValueSizeConstraint(1, MAX)
id_dn = univ.ObjectIdentifier('2.16.840.1.101.2.1.16.0')
class siren_dn(SIREntityName):
def __init__(self):
SIREntityName.__init__(self)
self['sirenType'] = id_dn
# Key Package Error CMS Content Type
class EnumeratedErrorCode(univ.Enumerated):
pass
# Error codes with values <= 33 are aligned with RFC 5934
EnumeratedErrorCode.namedValues = namedval.NamedValues(
('decodeFailure', 1),
('badContentInfo', 2),
('badSignedData', 3),
('badEncapContent', 4),
('badCertificate', 5),
('badSignerInfo', 6),
('badSignedAttrs', 7),
('badUnsignedAttrs', 8),
('missingContent', 9),
('noTrustAnchor', 10),
('notAuthorized', 11),
('badDigestAlgorithm', 12),
('badSignatureAlgorithm', 13),
('unsupportedKeySize', 14),
('unsupportedParameters', 15),
('signatureFailure', 16),
('insufficientMemory', 17),
('incorrectTarget', 23),
('missingSignature', 29),
('resourcesBusy', 30),
('versionNumberMismatch', 31),
('revokedCertificate', 33),
('ambiguousDecrypt', 60),
('noDecryptKey', 61),
('badEncryptedData', 62),
('badEnvelopedData', 63),
('badAuthenticatedData', 64),
('badAuthEnvelopedData', 65),
('badKeyAgreeRecipientInfo', 66),
('badKEKRecipientInfo', 67),
('badEncryptContent', 68),
('badEncryptAlgorithm', 69),
('missingCiphertext', 70),
('decryptFailure', 71),
('badMACAlgorithm', 72),
('badAuthAttrs', 73),
('badUnauthAttrs', 74),
('invalidMAC', 75),
('mismatchedDigestAlg', 76),
('missingCertificate', 77),
('tooManySigners', 78),
('missingSignedAttributes', 79),
('derEncodingNotUsed', 80),
('missingContentHints', 81),
('invalidAttributeLocation', 82),
('badMessageDigest', 83),
('badKeyPackage', 84),
('badAttributes', 85),
('attributeComparisonFailure', 86),
('unsupportedSymmetricKeyPackage', 87),
('unsupportedAsymmetricKeyPackage', 88),
('constraintViolation', 89),
('ambiguousDefaultValue', 90),
('noMatchingRecipientInfo', 91),
('unsupportedKeyWrapAlgorithm', 92),
('badKeyTransRecipientInfo', 93),
('other', 127)
)
class ErrorCodeChoice(univ.Choice):
pass
ErrorCodeChoice.componentType = namedtype.NamedTypes(
namedtype.NamedType('enum', EnumeratedErrorCode()),
namedtype.NamedType('oid', univ.ObjectIdentifier())
)
class KeyPkgID(univ.OctetString):
pass
class KeyPkgIdentifier(univ.Choice):
pass
KeyPkgIdentifier.componentType = namedtype.NamedTypes(
namedtype.NamedType('pkgID', KeyPkgID()),
namedtype.NamedType('attribute', SingleAttribute())
)
class KeyPkgVersion(univ.Integer):
pass
KeyPkgVersion.namedValues = namedval.NamedValues(
('v1', 1),
('v2', 2)
)
KeyPkgVersion.subtypeSpec = constraint.ValueRangeConstraint(1, 65535)
id_ct_KP_keyPackageError = univ.ObjectIdentifier('2.16.840.1.101.2.1.2.78.6')
class KeyPackageError(univ.Sequence):
pass
KeyPackageError.componentType = namedtype.NamedTypes(
namedtype.DefaultedNamedType('version', KeyPkgVersion().subtype(value='v2')),
namedtype.OptionalNamedType('errorOf', KeyPkgIdentifier().subtype(
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatConstructed, 0))),
namedtype.NamedType('errorBy', SIREntityName()),
namedtype.NamedType('errorCode', ErrorCodeChoice())
)
# Key Package Receipt CMS Content Type
id_ct_KP_keyPackageReceipt = univ.ObjectIdentifier('2.16.840.1.101.2.1.2.78.3')
class KeyPackageReceipt(univ.Sequence):
pass
KeyPackageReceipt.componentType = namedtype.NamedTypes(
namedtype.DefaultedNamedType('version', KeyPkgVersion().subtype(value='v2')),
namedtype.NamedType('receiptOf', KeyPkgIdentifier()),
namedtype.NamedType('receivedBy', SIREntityName())
)
# Key Package Receipt Request Attribute
class KeyPkgReceiptReq(univ.Sequence):
pass
KeyPkgReceiptReq.componentType = namedtype.NamedTypes(
namedtype.DefaultedNamedType('encryptReceipt', univ.Boolean().subtype(value=0)),
namedtype.OptionalNamedType('receiptsFrom', SIREntityNames().subtype(
implicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),
namedtype.NamedType('receiptsTo', SIREntityNames())
)
id_aa_KP_keyPkgIdAndReceiptReq = univ.ObjectIdentifier('2.16.840.1.101.2.1.5.65')
class KeyPkgIdentifierAndReceiptReq(univ.Sequence):
pass
KeyPkgIdentifierAndReceiptReq.componentType = namedtype.NamedTypes(
namedtype.NamedType('pkgID', KeyPkgID()),
namedtype.OptionalNamedType('receiptReq', KeyPkgReceiptReq())
)
# Map of Attribute Type OIDs to Attributes are added to
# the ones that are in rfc5652.py
_cmsAttributesMapUpdate = {
id_aa_KP_keyPkgIdAndReceiptReq: KeyPkgIdentifierAndReceiptReq(),
}
rfc5652.cmsAttributesMap.update(_cmsAttributesMapUpdate)
# Map of CMC Content Type OIDs to CMC Content Types are added to
# the ones that are in rfc5652.py
_cmsContentTypesMapUpdate = {
id_ct_KP_keyPackageError: KeyPackageError(),
id_ct_KP_keyPackageReceipt: KeyPackageReceipt(),
}
rfc5652.cmsContentTypesMap.update(_cmsContentTypesMapUpdate)
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| __pycache__ | Folder | 0755 |
|
|
| __init__.py | File | 65 B | 0644 |
|
| pem.py | File | 2.01 KB | 0644 |
|
| rfc1155.py | File | 2.62 KB | 0644 |
|
| rfc1157.py | File | 3.47 KB | 0644 |
|
| rfc1901.py | File | 646 B | 0644 |
|
| rfc1902.py | File | 3.62 KB | 0644 |
|
| rfc1905.py | File | 4.72 KB | 0644 |
|
| rfc2251.py | File | 26.3 KB | 0644 |
|
| rfc2314.py | File | 1.28 KB | 0644 |
|
| rfc2315.py | File | 9.44 KB | 0644 |
|
| rfc2437.py | File | 2.56 KB | 0644 |
|
| rfc2459.py | File | 48.83 KB | 0644 |
|
| rfc2511.py | File | 10.11 KB | 0644 |
|
| rfc2560.py | File | 8.21 KB | 0644 |
|
| rfc2631.py | File | 1.19 KB | 0644 |
|
| rfc2634.py | File | 9.2 KB | 0644 |
|
| rfc2985.py | File | 14.02 KB | 0644 |
|
| rfc2986.py | File | 1.85 KB | 0644 |
|
| rfc3114.py | File | 1.92 KB | 0644 |
|
| rfc3161.py | File | 4.16 KB | 0644 |
|
| rfc3274.py | File | 1.63 KB | 0644 |
|
| rfc3279.py | File | 6.65 KB | 0644 |
|
| rfc3280.py | File | 45.53 KB | 0644 |
|
| rfc3281.py | File | 9.63 KB | 0644 |
|
| rfc3412.py | File | 1.91 KB | 0644 |
|
| rfc3414.py | File | 1.14 KB | 0644 |
|
| rfc3447.py | File | 1.57 KB | 0644 |
|
| rfc3560.py | File | 1.78 KB | 0644 |
|
| rfc3565.py | File | 1.4 KB | 0644 |
|
| rfc3709.py | File | 6.32 KB | 0644 |
|
| rfc3770.py | File | 1.7 KB | 0644 |
|
| rfc3779.py | File | 3.18 KB | 0644 |
|
| rfc3852.py | File | 19.63 KB | 0644 |
|
| rfc4043.py | File | 1.04 KB | 0644 |
|
| rfc4055.py | File | 10.15 KB | 0644 |
|
| rfc4073.py | File | 1.6 KB | 0644 |
|
| rfc4108.py | File | 10.35 KB | 0644 |
|
| rfc4210.py | File | 27.8 KB | 0644 |
|
| rfc4211.py | File | 11.83 KB | 0644 |
|
| rfc4334.py | File | 1.55 KB | 0644 |
|
| rfc4985.py | File | 961 B | 0644 |
|
| rfc5035.py | File | 4.42 KB | 0644 |
|
| rfc5083.py | File | 1.84 KB | 0644 |
|
| rfc5084.py | File | 2.79 KB | 0644 |
|
| rfc5208.py | File | 1.4 KB | 0644 |
|
| rfc5280.py | File | 50.04 KB | 0644 |
|
| rfc5480.py | File | 4.72 KB | 0644 |
|
| rfc5649.py | File | 830 B | 0644 |
|
| rfc5652.py | File | 20.95 KB | 0644 |
|
| rfc5751.py | File | 3.12 KB | 0644 |
|
| rfc5755.py | File | 11.8 KB | 0644 |
|
| rfc5913.py | File | 1.13 KB | 0644 |
|
| rfc5914.py | File | 3.63 KB | 0644 |
|
| rfc5915.py | File | 1.03 KB | 0644 |
|
| rfc5916.py | File | 800 B | 0644 |
|
| rfc5917.py | File | 1.48 KB | 0644 |
|
| rfc5924.py | File | 425 B | 0644 |
|
| rfc5934.py | File | 23.24 KB | 0644 |
|
| rfc5940.py | File | 1.58 KB | 0644 |
|
| rfc5958.py | File | 2.59 KB | 0644 |
|
| rfc5990.py | File | 5.38 KB | 0644 |
|
| rfc6010.py | File | 2.29 KB | 0644 |
|
| rfc6019.py | File | 1.06 KB | 0644 |
|
| rfc6031.py | File | 11.85 KB | 0644 |
|
| rfc6032.py | File | 1.9 KB | 0644 |
|
| rfc6120.py | File | 818 B | 0644 |
|
| rfc6170.py | File | 409 B | 0644 |
|
| rfc6187.py | File | 489 B | 0644 |
|
| rfc6210.py | File | 1.03 KB | 0644 |
|
| rfc6211.py | File | 2.2 KB | 0644 |
|
| rfc6402-1.py | File | 16.65 KB | 0644 |
|
| rfc6402.py | File | 16.75 KB | 0644 |
|
| rfc6482.py | File | 2.04 KB | 0644 |
|
| rfc6486.py | File | 1.87 KB | 0644 |
|
| rfc6487.py | File | 472 B | 0644 |
|
| rfc6664.py | File | 4.17 KB | 0644 |
|
| rfc6955.py | File | 2.75 KB | 0644 |
|
| rfc6960.py | File | 7.73 KB | 0644 |
|
| rfc7030.py | File | 1.41 KB | 0644 |
|
| rfc7191.py | File | 6.9 KB | 0644 |
|
| rfc7229.py | File | 743 B | 0644 |
|
| rfc7292.py | File | 8.28 KB | 0644 |
|
| rfc7296.py | File | 885 B | 0644 |
|
| rfc7508.py | File | 2.13 KB | 0644 |
|
| rfc7585.py | File | 1.05 KB | 0644 |
|
| rfc7633.py | File | 841 B | 0644 |
|
| rfc7773.py | File | 1.28 KB | 0644 |
|
| rfc7894-1.py | File | 2.73 KB | 0644 |
|
| rfc7894.py | File | 2.7 KB | 0644 |
|
| rfc7906.py | File | 18.48 KB | 0644 |
|
| rfc7914.py | File | 1.46 KB | 0644 |
|
| rfc8017.py | File | 4.08 KB | 0644 |
|
| rfc8018.py | File | 6.02 KB | 0644 |
|
| rfc8103.py | File | 1017 B | 0644 |
|
| rfc8209.py | File | 393 B | 0644 |
|
| rfc8226.py | File | 4.19 KB | 0644 |
|
| rfc8358.py | File | 1.11 KB | 0644 |
|
| rfc8360.py | File | 1.05 KB | 0644 |
|
| rfc8398.py | File | 1.16 KB | 0644 |
|
| rfc8410.py | File | 971 B | 0644 |
|
| rfc8418.py | File | 1.08 KB | 0644 |
|
| rfc8419.py | File | 1.66 KB | 0644 |
|
| rfc8479.py | File | 1.12 KB | 0644 |
|
| rfc8494.py | File | 2.31 KB | 0644 |
|
| rfc8520.py | File | 1.46 KB | 0644 |
|
| rfc8619.py | File | 1.11 KB | 0644 |
|
| rfc8649.py | File | 982 B | 0644 |
|