management.views.tlsΒΆ

TLS setting specific views.

ClassesΒΆ

TlsSettingsContextMixin

Mixin which adds data to the context for the TLS settings application.

TlsView

View to display certificate details, including Subject Alternative Name (SAN) and associated IP addresses.

Module ContentsΒΆ

class management.views.tls.TlsSettingsContextMixin[source]ΒΆ

Mixin which adds data to the context for the TLS settings application.

extra_context: ClassVar[source]ΒΆ
class management.views.tls.TlsView[source]ΒΆ

Bases: TlsSettingsContextMixin, django.views.generic.FormView[management.forms.IPv4AddressForm]

View to display certificate details, including Subject Alternative Name (SAN) and associated IP addresses.

template_name = 'management/tls.html'[source]ΒΆ
form_class[source]ΒΆ
success_url[source]ΒΆ
get_form_kwargs()[source]ΒΆ

Pass additional arguments (e.g., SAN IPs) to the form.

Return type:

dict[str, Any]

get_context_data(**kwargs)[source]ΒΆ

Add certificate information, including SAN data and issuer details, to the context for display.

Parameters:

kwargs (dict[str, Any])

Return type:

dict[str, Any]

form_valid(form)[source]ΒΆ

Handle valid form submissions.

Parameters:

form (management.forms.IPv4AddressForm)

Return type:

django.http.HttpResponse

form_invalid(form)[source]ΒΆ

Handle invalid form submissions.

Parameters:

form (management.forms.IPv4AddressForm)

Return type:

django.http.HttpResponse

get_san_ips()[source]ΒΆ

Fetches IPv4 addresses from the Subject Alternative Name (SAN) extension of the active TLS certificate.

Returns:

A list of IPv4 addresses (as strings) or an empty list if none are found.

Return type:

list[str]