Ejemplo n.º 1
0
class TBSCertificate(Sequence):
    # TBSCertificate  ::=  SEQUENCE  {
    #     version         [0]  Version DEFAULT v1,
    #     serialNumber         CertificateSerialNumber,
    #     signature            AlgorithmIdentifier,
    #     issuer               Name,
    #     validity             Validity,
    #     subject              Name,
    #     subjectPublicKeyInfo SubjectPublicKeyInfo,
    #     issuerUniqueID  [1]  IMPLICIT UniqueIdentifier OPTIONAL,
    #                         -- If present, version MUST be v2 or v3
    #     subjectUniqueID [2]  IMPLICIT UniqueIdentifier OPTIONAL,
    #                         -- If present, version MUST be v2 or v3
    #     extensions      [3]  Extensions OPTIONAL
    #                         -- If present, version MUST be v3 --  }
    schema = (
        ("version", Version(expl=tag_ctxc(0), default="v1")),
        ("serialNumber", CertificateSerialNumber()),
        ("signature", AlgorithmIdentifier()),
        ("issuer", Name()),
        ("validity", Validity()),
        ("subject", Name()),
        ("subjectPublicKeyInfo", SubjectPublicKeyInfo()),
        ("issuerUniqueID", UniqueIdentifier(impl=tag_ctxp(1), optional=True)),
        ("subjectUniqueID", UniqueIdentifier(impl=tag_ctxp(2), optional=True)),
        ("extensions", Extensions(expl=tag_ctxc(3), optional=True)),
    )
Ejemplo n.º 2
0
class TBSCertificate(Sequence):
    schema = (
        ("version", Version(expl=tag_ctxc(0), default="v1")),
        ("serialNumber", CertificateSerialNumber()),
        ("signature", AlgorithmIdentifier()),
        ("issuer", Name()),
        ("validity", Validity()),
        ("subject", Name()),
        ("subjectPublicKeyInfo", SubjectPublicKeyInfo()),
        ("issuerUniqueID", UniqueIdentifier(impl=tag_ctxp(1), optional=True)),
        ("subjectUniqueID", UniqueIdentifier(impl=tag_ctxp(2), optional=True)),
        ("extensions", Extensions(expl=tag_ctxc(3), optional=True)),
    )
Ejemplo n.º 3
0
Archivo: cms.py Proyecto: Sinopsys/gsl
class EncryptedContentInfo(Sequence):
    schema = (
        ("contentType", ContentType()),
        ("contentEncryptionAlgorithm", ContentEncryptionAlgorithmIdentifier()),
        ("encryptedContent", EncryptedContent(impl=tag_ctxp(0),
                                              optional=True)),
    )
Ejemplo n.º 4
0
class AuthorityKeyIdentifier(Sequence):
    # AuthorityKeyIdentifier ::= SEQUENCE {
    #     keyIdentifier             [0] KeyIdentifier           OPTIONAL,
    #     authorityCertIssuer       [1] GeneralNames            OPTIONAL,
    #     authorityCertSerialNumber [2] CertificateSerialNumber OPTIONAL  }
    schema = (
        ("keyIdentifier", KeyIdentifier(impl=tag_ctxp(0), optional=True)),
        # ("authorityCertIssuer", GeneralNames(impl=tag_ctxc(1), optional=True)),
        # ("authorityCertSerialNumber", CertificateSerialNumber(impl=tag_ctxc(2), optional=True)),
    )
Ejemplo n.º 5
0
class GeneralName(Choice):
    #    GeneralName ::= CHOICE {
    #         otherName                       [0]     OtherName,
    #         rfc822Name                      [1]     IA5String,
    #         dNSName                         [2]     IA5String,
    #         x400Address                     [3]     ORAddress,
    #         directoryName                   [4]     Name,
    #         ediPartyName                    [5]     EDIPartyName,
    #         uniformResourceIdentifier       [6]     IA5String,
    #         iPAddress                       [7]     OCTET STRING,
    #         registeredID                    [8]     OBJECT IDENTIFIER }
    schema = (
        ("otherName", OtherName(impl=tag_ctxp(0))),
        ("rfc822Name", IA5String(impl=tag_ctxp(1))),
        ("dNSName", IA5String(impl=tag_ctxp(2))),
        ("x400Address", ORAddress(impl=tag_ctxp(3))),
        ("directoryName", Name(expl=tag_ctxp(4))),
        ("ediPartyName", EDIPartyName(impl=tag_ctxp(5))),
        ("uniformResourceIdentifier", IA5String(impl=tag_ctxp(6))),
        ("iPAddress", OctetString(impl=tag_ctxp(7))),
        ("registeredID", ObjectIdentifier(impl=tag_ctxp(8))),
    )
Ejemplo n.º 6
0
Archivo: cms.py Proyecto: Sinopsys/gsl
class Gost2814789EncryptedKey(Sequence):
    schema = (
        ("encryptedKey", Gost2814789Key()),
        ("maskKey", Gost2814789Key(impl=tag_ctxp(0), optional=True)),
        ("macKey", Gost2814789MAC()),
    )