def createCertificate(req, (issuerCert, issuerKey), serial, (notBefore, notAfter), digest="md5"):
    cert = crypto.X509()
    cert.set_serial_number(serial)
    cert.gmtime_adj_notBefore(notBefore)
    cert.gmtime_adj_notAfter(notAfter)
    cert.set_issuer(issuerCert.get_subject())
    cert.set_subject(req.get_subject())
    cert.set_pubkey(req.get_pubkey())
    cert.sign(issuerKey, digest)
    return cert
Returns inactive instances of ActivatorModel: SomeModel.objects.inactive()
dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/pyopenssl/examples/certgen.py/createCertificate--crossover with--dataset/ETHPy150Open mozilla/inventory/vendor-local/src/django-extensions/build/lib/django_extensions/db/models.py/ActivatorModelManager.inactive