diff options
Diffstat (limited to 'core/certmanager.lua')
-rw-r--r-- | core/certmanager.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/certmanager.lua b/core/certmanager.lua index c6310473..6a46588c 100644 --- a/core/certmanager.lua +++ b/core/certmanager.lua @@ -336,8 +336,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); |