Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Yaroslav Borbat <[email protected]>
  • Loading branch information
yaroslavborbat committed Mar 5, 2024
1 parent 15fae64 commit a03c0c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion hooks/lib/certificate/certificate.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ def with_hosts(self, *hosts: str):
if not is_valid_hostname(h):
continue
alt_names.append(f"DNS:{h}")
self.add_extension("subjectAltName", False, ", ".join(alt_names))
if len(alt_names) > 0:
self.add_extension("subjectAltName", False, ", ".join(alt_names))
return self

def __sign(self, ca_subj: crypto.X509Name, ca_key: crypto.PKey) -> None:
Expand Down
2 changes: 1 addition & 1 deletion hooks/lib/hooks/internal_tls.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ def r(ctx: hook.Context):
snaps[s["filterResult"]["name"]] = TLSSecretData(
s["filterResult"]["data"])
ca_data = TLSSecretData()
if self.__with_common_ca:
if self.__with_common_ca():
tls_value_data = self.__sync_ca(self.ca_request,
snaps.get(self.ca_request.ca_secret_name, TLSSecretData()))
ca_data = convert_to_TLSSecretData(tls_value_data)
Expand Down

0 comments on commit a03c0c2

Please sign in to comment.