Signals¶
django-ca adds a few custom Django signals to important events to let you execute custom actions when these events happen. Please see Django’s documentation on signals for further information on how to use signals.
If you installed django-ca from source, 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.
- ca
- 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.
- cert
- 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.
- cert
- django_ca.signals.post_sign_cert = <django.dispatch.dispatcher.Signal object>¶
Called after signing a certificate.
- Parameters:
- ca
CertificateAuthority
The Certificate Authority used to sign the certificate
- cert
Certificate
The raw certificate that was just created.
- ca
- django_ca.signals.pre_create_ca = <django.dispatch.dispatcher.Signal object>¶
Called before a new certificate authority is created.
- Parameters:
- namestr
The name of the future CA.
- **kwargs
- django_ca.signals.pre_revoke_cert = <django.dispatch.dispatcher.Signal object>¶
Called before a certificate is revoked.
- Parameters:
- ca
- csr
- **kwargs
- django_ca.signals.pre_sign_cert = <django.dispatch.dispatcher.Signal object>¶
Called before signing a certificate.
- Parameters:
- ca
CertificateAuthority
The certificate authority used to sign the certificate
- csr
CertificateSigningRequest
The certificate signing request used for the certificate.
- expiresdatetime
When the certificate will expire.
- algorithm
HashAlgorithm
The algorithm used for signing the certificate.
- subject
Name
The subject for the certificate.
- extensionslist of
Extension
The extensions that will be added to the certificate.
- passwordstr or bytes, optional
The password used for accessing the private key of the certificate authority.
- ca