def init(self, ca, csr, **kwargs):
        """Create a signed certificate from a CSR and store it to the database.

        All parameters are passed on to :py:func:`Certificate.objects.sign_cert()
        <django_ca.managers.CertificateManager.sign_cert>`.
        """

        c = self.model(ca=ca)
        c.x509, csr = self.sign_cert(ca, csr, **kwargs)
        c.csr = csr.public_bytes(Encoding.PEM).decode('utf-8')
        c.save()

        post_issue_cert.send(sender=self.model, cert=c)
        return c
Create a signed certificate from a CSR and store it to the database.

        All parameters are passed on to :py:func:`Certificate.objects.sign_cert()
        <django_ca.managers.CertificateManager.sign_cert>`.