From 4bd90ab9df1a4013abd3610f8e15a7881f15bad3 Mon Sep 17 00:00:00 2001 From: psychon Date: Sat, 11 Oct 2008 15:43:30 +0000 Subject: [PATCH] Make --makeconf check for znc.pem and generate it if it's missing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch is based on ideas and an actual patch from the-me aka Patrick Matthäi. Thanks. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1246 726aef4b-f618-498e-8847-2d620e286838 --- znc.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/znc.cpp b/znc.cpp index bf040010..da5c8d21 100644 --- a/znc.cpp +++ b/znc.cpp @@ -571,6 +571,15 @@ bool CZNC::WriteNewConfig(CString& sConfigFile) { #ifdef HAVE_LIBSSL if (CUtils::GetBoolInput("Would you like ZNC to listen using SSL?", false)) { sSSL = "+"; + + CString sPemFile = GetPemLocation(); + if (!CFile::Exists(sPemFile)) { + CUtils::PrintError("Unable to locate pem file: [" + sPemFile + "]"); + if (CUtils::GetBoolInput("Would you like to create a new pem file now?", + true)) { + WritePemFile(); + } + } } #endif