From 6495851c7f03c563d0c81b74089adf76a7e6f8a7 Mon Sep 17 00:00:00 2001 From: John Date: Thu, 3 Nov 2022 07:35:44 +0100 Subject: [PATCH] explicit error message when using https without ssl support compiled in --- src/ebusd/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ebusd/main.cpp b/src/ebusd/main.cpp index 1447d750..1a6b9e32 100644 --- a/src/ebusd/main.cpp +++ b/src/ebusd/main.cpp @@ -1406,6 +1406,12 @@ int main(int argc, char* argv[]) { uint16_t configPort = 80; string proto, configHost; if (!HttpClient::parseUrl(s_configPath, &proto, &configHost, &configPort, &s_configUriPrefix)) { +#ifndef HAVE_SSL + if (proto=="https") { + logError(lf_main, "invalid configPath URL (HTTPS not supported)"); + return EINVAL; + } +#endif logError(lf_main, "invalid configPath URL"); return EINVAL; }