django_ca.tasks - Celery tasks

Asynchronous Celery tasks for django-ca.

(task)django_ca.tasks.acme_cleanup() None[source]

Cleanup expired ACME orders.

(task)django_ca.tasks.acme_issue_certificate(acme_certificate_pk: int) None[source]

Actually issue an ACME certificate.

(task)django_ca.tasks.acme_validate_challenge(challenge_pk: int) None[source]

Validate an ACME challenge.

(task)django_ca.tasks.cache_crl(serial: str, key_backend_options: Dict[str, Any]) None[source]

Task to cache the CRL for a given CA.

(task)django_ca.tasks.cache_crls(serials: Iterable[str] | None = None) None[source]

Task to cache the CRLs for all CAs.

(task)django_ca.tasks.generate_ocsp_key(serial: str, key_backend_options: Dict[str, Any], profile: str = 'ocsp', expires: int | None = None, algorithm: Literal['SHA-224', 'SHA-256', 'SHA-384', 'SHA-512', 'SHA3/224', 'SHA3/256', 'SHA3/384', 'SHA3/512'] | None = None, key_size: int | None = None, key_type: Literal['RSA', 'DSA', 'EC', 'Ed25519', 'Ed448'] | None = None, elliptic_curve: Literal['sect571r1', 'sect409r1', 'sect283r1', 'sect233r1', 'sect163r2', 'sect571k1', 'sect409k1', 'sect283k1', 'sect233k1', 'sect163k1', 'secp521r1', 'secp384r1', 'secp256r1', 'secp256k1', 'secp224r1', 'secp192r1', 'brainpoolP256r1', 'brainpoolP384r1', 'brainpoolP512r1'] | None = None, autogenerated: bool = True, force: bool = False) Tuple[str, str, int] | None[source]

Task to generate an OCSP key for the CA named by serial.

The serial names the certificate authority for which to regenerate the OCSP responder certificate. All other arguments are passed on to generate_ocsp_key().

The task returns the private and public key paths and the primary key of the generated certificate if a new certificate was generated, otherwise it returns None.

(task)django_ca.tasks.generate_ocsp_keys(**kwargs: Any) List[Tuple[str, str, int] | None][source]

Task to generate an OCSP keys for all usable CAs.

(task)django_ca.tasks.sign_certificate(order_pk: int, csr: str, subject: List[django_ca.typehints.SerializedPydanticNameAttribute], algorithm: Literal['SHA-224', 'SHA-256', 'SHA-384', 'SHA-512', 'SHA3/224', 'SHA3/256', 'SHA3/384', 'SHA3/512'] | None = None, expires: str | None = None, extensions: django_ca.typehints.SerializedPydanticExtension | None = None, profile: str = 'webserver', autogenerated: bool = False) int[source]

Sign a certificate from the given order with the given parameters.