Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Stop asking for the host name in --makepem

Come on, it's a self-signed certificate, how much value does it have anyway?
Also, it gets rid of a question during --makeconf which confuses some people.

This should now use $HOSTNAME and fall back to "host.unknown" if that isn't set.

Signed-off-by: Uli Schlachter <psychon@znc.in>
  • Loading branch information...
commit dcf357b1f6b0a437ae8712ff8268ab340cda6c51 1 parent 90f741d
@psychon psychon authored
Showing with 2 additions and 15 deletions.
  1. +1 −1  Utils.cpp
  2. +1 −14 znc.cpp
View
2  Utils.cpp
@@ -76,7 +76,7 @@ void CUtils::GenerateCert(FILE *pOut, const CString& sHost) {
}
if (!pHostName) {
- pHostName = "unknown.com";
+ pHostName = "host.unknown";
}
CString sEmailAddr = pLogName;
View
15 znc.cpp
@@ -282,19 +282,6 @@ bool CZNC::WritePemFile() {
return false;
#else
CString sPemFile = GetPemLocation();
- const char* pHostName = getenv("HOSTNAME");
- CString sHost;
-
- if (pHostName) {
- sHost = pHostName;
- }
-
- if (CFile::Exists(sPemFile)) {
- CUtils::PrintError("Pem file [" + sPemFile + "] already exists");
- return false;
- }
-
- while (!CUtils::GetInput("hostname of your shell", sHost, sHost, "including the '.com' portion")) ;
CUtils::PrintAction("Writing Pem file [" + sPemFile + "]");
FILE *f = fopen(sPemFile.c_str(), "w");
@@ -304,7 +291,7 @@ bool CZNC::WritePemFile() {
return false;
}
- CUtils::GenerateCert(f, sHost);
+ CUtils::GenerateCert(f, "");
fclose(f);
CUtils::PrintStatus(true);
Please sign in to comment.
Something went wrong with that request. Please try again.