Mercurial > prosody-hg
comparison core/certmanager.lua @ 13292:8fbdd878fcf6
Merge 0.12->trunk
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Fri, 27 Oct 2023 22:38:00 +0200 |
| parents | 1b1ed555f307 24070d47a6e7 |
| children | 4a05fbda927f |
comparison
equal
deleted
inserted
replaced
| 13290:c5767b7528ac | 13292:8fbdd878fcf6 |
|---|---|
| 305 mode = mode, | 305 mode = mode, |
| 306 -- We can't read the password interactively when daemonized | 306 -- We can't read the password interactively when daemonized |
| 307 password = function() log("error", "Encrypted certificate for %s requires 'ssl' 'password' to be set in config", host); end; | 307 password = function() log("error", "Encrypted certificate for %s requires 'ssl' 'password' to be set in config", host); end; |
| 308 }); | 308 }); |
| 309 local profile = configmanager.get("*", "tls_profile") or "intermediate"; | 309 local profile = configmanager.get("*", "tls_profile") or "intermediate"; |
| 310 if profile ~= "legacy" then | 310 if mozilla_ssl_configs[profile] then |
| 311 cfg:apply(mozilla_ssl_configs[profile]); | 311 cfg:apply(mozilla_ssl_configs[profile]); |
| 312 elseif profile ~= "legacy" then | |
| 313 log("error", "Invalid value for 'tls_profile': expected one of \"modern\", \"intermediate\" (default), \"old\" or \"legacy\" but got %q", profile); | |
| 314 return nil, "Invalid configuration, 'tls_profile' had an unknown value."; | |
| 312 end | 315 end |
| 313 cfg:apply(global_ssl_config); | 316 cfg:apply(global_ssl_config); |
| 314 | 317 |
| 315 for i = select('#', ...), 1, -1 do | 318 for i = select('#', ...), 1, -1 do |
| 316 cfg:apply(select(i, ...)); | 319 cfg:apply(select(i, ...)); |
