Exemplo n.º 1
0
class ExtKeyUsage(Extention):
    value = [
        base.ObjectId('extKeyUsage'),
        base.Boolean(True),
        base.OctetString(
            "\x30\x10\x06\x08\x2B\x06\x01\x05\x05\x07\x03\x04\x06\x04\x55\x1D\x25\x00"
        )
    ]
Exemplo n.º 2
0
 def __init__(self):
     self.version = base.Integer(1, name='version', check=True)
     self.issuerAndSerial = IssuerAndSerial()
     self.digestAlgorithm = x509.Algorithm('hashAlgorithmIdentifier', name='digestAlgorithm')
     self.attributes = Attributes()
     self.encryptionAlgorithm = x509.Algorithm('rsaEncryption', name="encryptionAlgorithm")
     self.digest = base.OctetString(name='digest')
     base.Sequence.__init__(self,
                            [self.version,
                             self.issuerAndSerial,
                             self.digestAlgorithm,
                             self.attributes,
                             self.encryptionAlgorithm,
                             self.digest])
Exemplo n.º 3
0
class AttMessageDigest(Attribute):
    value = [base.ObjectId('messageDigest'), base.Set([base.OctetString()])]
Exemplo n.º 4
0
class KeyUsage(Extention):
    value = [
        base.ObjectId('keyUsage'),
        base.Boolean(True),
        base.OctetString("\x03\x02\x01\xFE")
    ]
Exemplo n.º 5
0
class Extention(base.Sequence):
    value = [
        base.ObjectId(name='extId'),
        base.Boolean(name='critical'),
        base.OctetString(name='value')
    ]