Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Show error for --makepem if compiled without SSL.

  • Loading branch information...
commit e127d441707371cb15ae731173306f01efaf4117 1 parent 37e6bbd
Alexey Sokolov authored
Showing with 5 additions and 6 deletions.
  1. +5 −6 main.cpp
View
11 main.cpp
@@ -40,9 +40,7 @@ static const struct option g_LongOpts[] = {
{ "allow-root", no_argument, 0, 'r' },
{ "makeconf", no_argument, 0, 'c' },
{ "makepass", no_argument, 0, 's' },
-#ifdef HAVE_LIBSSL
{ "makepem", no_argument, 0, 'p' },
-#endif /* HAVE_LIBSSL */
{ "datadir", required_argument, 0, 'd' },
{ 0, 0, 0, 0 }
};
@@ -131,11 +129,9 @@ int main(int argc, char** argv) {
#endif
#ifdef HAVE_LIBSSL
bool bMakePem = false;
+#endif
while ((iArg = getopt_long(argc, argv, "hvnrcspd:Df", g_LongOpts, &iOptIndex)) != -1) {
-#else
- while ((iArg = getopt_long(argc, argv, "hvnrcsd:Df", g_LongOpts, &iOptIndex)) != -1) {
-#endif /* HAVE_LIBSSL */
switch (iArg) {
case 'h':
GenerateHelp(argv[0]);
@@ -155,10 +151,13 @@ int main(int argc, char** argv) {
case 's':
bMakePass = true;
break;
-#ifdef HAVE_LIBSSL
case 'p':
+#ifdef HAVE_LIBSSL
bMakePem = true;
break;
+#else
+ CUtils::PrintError("ZNC is compiled without SSL support.");
+ return 1;
#endif /* HAVE_LIBSSL */
case 'd':
sDataDir = CString(optarg);
Please sign in to comment.
Something went wrong with that request. Please try again.