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.api_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, not_after: str | None = None, extensions: list[django_ca.typehints.SerializedPydanticExtension] | None = None, profile: str = 'webserver', autogenerated: bool = False, key_backend_options: dict[str, dict[str, 'JSON'] | list['JSON'] | str | int | float | bool | None] | None = None) int | None[source]

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

(task)django_ca.tasks.cache_crl(serial: str, key_backend_options: dict[str, dict[str, 'JSON'] | list['JSON'] | str | int | float | bool | None] | None = None) None[source]

Task to cache the CRL for a given CA.

(task)django_ca.tasks.cache_crls(serials: collections.abc.Iterable[str] | None = None, key_backend_options: dict[str, dict[str, dict[str, 'JSON'] | list['JSON'] | str | int | float | bool | None]] | 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, dict[str, 'JSON'] | list['JSON'] | str | int | float | bool | None] | None = None, profile: str = 'ocsp', not_after: str | 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) 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 primary key of the generated certificate if it was generated, or None otherwise.

(task)django_ca.tasks.generate_ocsp_keys(serials: collections.abc.Iterable[str] | None = None, key_backend_options: dict[str, dict[str, dict[str, 'JSON'] | list['JSON'] | str | int | float | bool | None]] | None = None) None[source]

Task to generate an OCSP keys for all usable CAs.