Пример #1
0
 def __init__(self):
     self.version = base.Integer(1, name='version', check=True)
     self.digestAlgorithms = DigestAlgorithms()
     self.contentInfo = ContentInfo()
     self.certificates = base.Optional(x509.Certificate, [x509.Certificate()], name='certificates')
     self.signerInfos = base.Set([SignerInfo()], name="signerInfos")
     base.Sequence.__init__(self, [self.version, self.digestAlgorithms,
                                   self.contentInfo, self.certificates, self.signerInfos])
Пример #2
0
class AttKeyPref(Attribute):
    value = [base.ObjectId('id-aa-encrypKeyPref'), base.Set([IssuerAndSerial(tag=0xA0)])]

    def setup(self, value):
        self.value[1].value[0].setup(value.value)
Пример #3
0
class AttSMIMECaps(Attribute):
    value = [base.ObjectId('smimeCapabilities'), base.Set([SMIMECaps()])]
Пример #4
0
class AttMSEncryptionCert(Attribute):
    value = [base.ObjectId('Microsoft_Encryption_Cert'), base.Set([IssuerAndSerial()])]

    def setup(self, value):
        self.value[1].value[0].setup(value.value)
Пример #5
0
class AttMessageDigest(Attribute):
    value = [base.ObjectId('messageDigest'), base.Set([base.OctetString()])]
Пример #6
0
class AttSigningTime(Attribute):
    value = [base.ObjectId('signing-time'), base.Set([base.UTCTime()])]
Пример #7
0
class AttContentType(Attribute):
    value = [base.ObjectId('contentType'), base.Set([base.ObjectId('data')])]
Пример #8
0
class Attribute(base.Sequence):
    value = [base.ObjectId(), base.Set()]

    def setup(self, value):
        self.value[1].value[0].setup(value)