mirror of
https://github.com/znc/znc.git
synced 2026-08-09 02:12:56 +02:00
fixed use of --encrypt-pem
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@730 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -27,7 +27,7 @@ void GenerateHelp(const char *appname) {
|
||||
CUtils::PrintMessage("\t--makepass Generates a password for use in config");
|
||||
#ifdef HAVE_LIBSSL
|
||||
CUtils::PrintMessage("\t--makepem Generates a pemfile for use with SSL");
|
||||
CUtils::PrintMessage("\t--encrypt-pem Encrypts the pemfile");
|
||||
CUtils::PrintMessage("\t--encrypt-pem when used along with --makepem, encrypts the private key in the pemfile");
|
||||
#endif /* HAVE_LIBSSL */
|
||||
}
|
||||
|
||||
@@ -138,11 +138,16 @@ int main(int argc, char** argv, char** envp) {
|
||||
if (bMakePem) {
|
||||
CZNC* pZNC = &CZNC::Get();
|
||||
pZNC->InitDirs("");
|
||||
pZNC->WritePemFile();
|
||||
pZNC->WritePemFile( bEncPem );
|
||||
|
||||
delete pZNC;
|
||||
return 0;
|
||||
}
|
||||
if( bEncPem && !bMakePem ) {
|
||||
CUtils::PrintError("--encrypt-pem should be used along with --makepem.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif /* HAVE_LIBSSL */
|
||||
if (bMakePass) {
|
||||
CString sHash = CUtils::GetHashPass();
|
||||
|
||||
Reference in New Issue
Block a user