aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/certmanager.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/certmanager.lua b/core/certmanager.lua
index b04f7da0..a4acb0a0 100644
--- a/core/certmanager.lua
+++ b/core/certmanager.lua
@@ -307,8 +307,11 @@ local function create_context(host, mode, ...)
password = function() log("error", "Encrypted certificate for %s requires 'ssl' 'password' to be set in config", host); end;
});
local profile = configmanager.get("*", "tls_profile") or "intermediate";
- if profile ~= "legacy" then
+ if mozilla_ssl_configs[profile] then
cfg:apply(mozilla_ssl_configs[profile]);
+ elseif profile ~= "legacy" then
+ log("error", "Invalid value for 'tls_profile': expected one of \"modern\", \"intermediate\" (default), \"old\" or \"legacy\" but got %q", profile);
+ return nil, "Invalid configuration, 'tls_profile' had an unknown value.";
end
cfg:apply(global_ssl_config);