Fix host name retrieval during TLS certificate generation (#1935)

Use HOSTNAME if defined, otherwise invoke gethostname(3) if possible,
fallback to uname(2)
This commit is contained in:
Giovanni
2025-03-16 15:43:39 +00:00
committed by GitHub
parent 9ec6ce833e
commit 30fbf1172c
5 changed files with 43 additions and 12 deletions
+1 -1
View File
@@ -316,7 +316,7 @@ bool CZNC::WritePemFile() {
return false;
}
CUtils::GenerateCert(f, "");
CUtils::GenerateCert(f);
fclose(f);
CUtils::PrintStatus(true);