Signals

django-ca adds a few custom Django signals to important events to let you execute custom actions when these events happen. Please see Djangos documentation on signals for further information on how to use signals.

If you use django-ca as standalone project, use the CA_CUSTOM_APPS setting to add a custom django app. Please see the Django documentation on apps if you need help on writing Django apps.

django_ca.signals.post_create_ca = <django.dispatch.dispatcher.Signal object>

Called after a new certificate authority was created.

Parameters:
ca : CertificateAuthority

The certificate authority that was just created.

django_ca.signals.post_issue_cert = <django.dispatch.dispatcher.Signal object>

Called after a new certificate was issued.

Parameters:
cert : Certificate

The certificate that was just issued.

django_ca.signals.post_revoke_cert = <django.dispatch.dispatcher.Signal object>

Called after a certificate was revoked

Parameters:
cert : Certificate

The certificate that was just revoked.

django_ca.signals.pre_create_ca = <django.dispatch.dispatcher.Signal object>

Called before a new certificate authority is created.

Parameters:
name : str

The name of the future CA.

**kwargs
django_ca.signals.pre_issue_cert = <django.dispatch.dispatcher.Signal object>

Called before a new certificate is issued.

Parameters:
ca
csr
**kwargs

All additional parameters passed to Certificate.objects.init(), but normalized to expected values. For example, this signal will receive a KeyUsage instance, regardless of how the parameter was actually passed.

django_ca.signals.pre_revoke_cert = <django.dispatch.dispatcher.Signal object>

Called before a certificate is revoked.

Parameters:
ca
csr
**kwargs