django_ca.views
- HTTP endpoints¶
Views for the django-ca app.
See also
- class django_ca.views.GenericCAIssuersView(**kwargs)[source]¶
Generic view that returns a CA public key in DER format.
This view serves the URL named in the
issuers
key in theAuthorityInformationAccess
extension.
- class django_ca.views.GenericOCSPView(**kwargs)[source]¶
View providing auto-configured OCSP functionality.
This view assumes that
ocsp/$ca_serial.(key|pem)
point to the private/public key of a responder certificate as created bygenerate_ocsp_keys
. Theserial
URL keyword argument must be the serial for this CA.
- class django_ca.views.OCSPView(**kwargs)[source]¶
View to provide an OCSP responder.
- ca = ''¶
The name or serial of your Certificate Authority.
- ca_ocsp = False¶
If set to
True
, validate child CAs instead.
- expires = 600¶
Time in seconds that the responses remain valid. The default is 600 seconds or ten minutes.
- fail(status=OCSPResponseStatus.INTERNAL_ERROR)[source]¶
Generic method to return a failure response.
- get_responder_key_data()[source]¶
Read the file containing the private key used to sign OCSP responses.
- http_response(data, status=HTTPStatus.OK)[source]¶
Get a HTTP OCSP response with given status and data.
- responder_cert = ''¶
Public key of the responder.
This may either be:
A relative path used by CA_FILE_STORAGE
A serial of a certificate as stored in the database
The PEM of the certificate as string
A loaded
Certificate
- responder_key = ''¶
Private key used for signing OCSP responses. A relative path used by CA_FILE_STORAGE.