Lines Matching refs:cert
22 cert = None variable in Certificate
24 def __init__(self, cert, key): argument
25 self.cert = cert
29 return crypto.dump_certificate(crypto.FILETYPE_PEM, self.cert)
47 cert = crypto.load_certificate(crypto.FILETYPE_PEM, data)
49 return Certificate(cert, key)
59 cert = crypto.X509()
60 cert.set_pubkey(key)
61 cert.set_version(2)
62 cert.set_serial_number(random.randint(0, 2**20))
64 cert.set_notBefore(notBefore)
65 cert.set_notAfter(notAfter)
66 cert.get_subject().CN = cn
67 cert.set_issuer(cert.get_subject() if issuer is None else issuer.cert.get_subject())
70 cert.add_extensions([basicContraints])
72 cert.add_extensions(additional_extensions)
75 cert.sign(signing_key, digest)
77 return Certificate(cert, key)