mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
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:
@@ -44,6 +44,7 @@ class CUtils {
|
||||
|
||||
static CString GetIP(unsigned long addr);
|
||||
static unsigned long GetLongIP(const CString& sIP);
|
||||
static CString GetHostName();
|
||||
|
||||
static void PrintError(const CString& sMessage);
|
||||
static void PrintMessage(const CString& sMessage, bool bStrong = false);
|
||||
@@ -74,7 +75,7 @@ class CUtils {
|
||||
static timeval GetTime();
|
||||
static unsigned long long GetMillTime();
|
||||
#ifdef HAVE_LIBSSL
|
||||
static void GenerateCert(FILE* pOut, const CString& sHost = "");
|
||||
static void GenerateCert(FILE* pOut);
|
||||
#endif /* HAVE_LIBSSL */
|
||||
|
||||
static CString CTime(time_t t, const CString& sTZ);
|
||||
|
||||
@@ -43,6 +43,8 @@
|
||||
#cmakedefine HAVE_TCSETATTR 1
|
||||
#cmakedefine HAVE_GETPASSPHRASE 1
|
||||
#cmakedefine HAVE_CLOCK_GETTIME 1
|
||||
#cmakedefine ZNC_HAVE_GETHOSTNAME 1
|
||||
#cmakedefine ZNC_HAVE_UNAME 1
|
||||
|
||||
#cmakedefine HAVE_ICU 1
|
||||
#define U_USING_ICU_NAMESPACE 1
|
||||
|
||||
Reference in New Issue
Block a user