Beispiel #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"
        )
    ]
Beispiel #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])
Beispiel #3
0
class AttMessageDigest(Attribute):
    value = [base.ObjectId('messageDigest'), base.Set([base.OctetString()])]
Beispiel #4
0
class KeyUsage(Extention):
    value = [
        base.ObjectId('keyUsage'),
        base.Boolean(True),
        base.OctetString("\x03\x02\x01\xFE")
    ]
Beispiel #5
0
class Extention(base.Sequence):
    value = [
        base.ObjectId(name='extId'),
        base.Boolean(name='critical'),
        base.OctetString(name='value')
    ]