Changeset

12196:b05e0b422ff7

core.certmanager: Apply TLS preset before global settings (thanks Menel) Allows overriding settings via the global 'ssl' settings as before. This order was probably accidental. That said, 'ssl' is a giant footgun we will want to discourage use of.
author Kim Alvefur <zash@zash.se>
date Tue, 18 Jan 2022 08:04:16 +0100
parents 12195:c5788969b812
children 12197:95d25e620dc2
files core/certmanager.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/core/certmanager.lua	Mon Jan 17 14:18:27 2022 +0000
+++ b/core/certmanager.lua	Tue Jan 18 08:04:16 2022 +0100
@@ -350,11 +350,11 @@
 		-- We can't read the password interactively when daemonized
 		password = function() log("error", "Encrypted certificate for %s requires 'ssl' 'password' to be set in config", host); end;
 	});
-	cfg:apply(global_ssl_config);
 	local preset = configmanager.get("*", "tls_preset") or "intermediate";
 	if preset ~= "legacy" then
 		cfg:apply(mozilla_ssl_configs[preset]);
 	end
+	cfg:apply(global_ssl_config);
 
 	for i = select('#', ...), 1, -1 do
 		cfg:apply(select(i, ...));