Changeset

13292:8fbdd878fcf6

Merge 0.12->trunk
author Kim Alvefur <zash@zash.se>
date Fri, 27 Oct 2023 22:38:00 +0200
parents 13290:c5767b7528ac (current diff) 13291:24070d47a6e7 (diff)
children 13293:ad1ed84fdf13
files core/certmanager.lua
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/core/certmanager.lua	Thu Oct 26 18:30:47 2023 +0100
+++ b/core/certmanager.lua	Fri Oct 27 22:38:00 2023 +0200
@@ -307,8 +307,11 @@
 		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);