Skip to content

Commit

Permalink
Adds missing docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
gruyaume committed Nov 16, 2023
1 parent 2159617 commit 3dcb3ab
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,19 @@ def _on_certificate_creation_request(self, event: CertificateCreationRequestEven
)
return
self._generate_self_signed_certificate(
csr=event.certificate_signing_request, is_ca=event.is_ca, relation_id=event.relation_id
csr=event.certificate_signing_request,
is_ca=event.is_ca,
relation_id=event.relation_id,
)

def _generate_self_signed_certificate(self, csr: str, is_ca: bool, relation_id: int):
def _generate_self_signed_certificate(self, csr: str, is_ca: bool, relation_id: int) -> None:
"""Generates self-signed certificate.
Args:
csr (str): Certificate signing request
is_ca (bool): Whether the certificate is a CA
relation_id (int): Relation id
"""
ca_certificate_secret = self.model.get_secret(label=CA_CERTIFICATES_SECRET_LABEL)
ca_certificate_secret_content = ca_certificate_secret.get_content()
certificate = generate_certificate(
Expand Down

0 comments on commit 3dcb3ab

Please sign in to comment.