Software /
code /
prosody
Changeset
12331:49739369dcad
core.certmanager: Turn soft dependency on LuaSec into a hard
The default network backend server_epoll already requires LuaSec so
Prosody won't even start without it, so we can get rid of these lines
here too.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 10 Feb 2022 17:15:55 +0100 |
parents | 12330:38b5b05407be |
children | 12332:0d245034600a |
files | core/certmanager.lua util/dependencies.lua |
diffstat | 2 files changed, 4 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/core/certmanager.lua Sat Dec 25 16:23:40 2021 +0100 +++ b/core/certmanager.lua Thu Feb 10 17:15:55 2022 +0100 @@ -6,20 +6,10 @@ -- COPYING file in the source package for more information. -- -local softreq = require"util.dependencies".softreq; -local ssl = softreq"ssl"; -if not ssl then - return { - create_context = function () - return nil, "LuaSec (required for encryption) was not found"; - end; - reload_ssl_config = function () end; - } -end - +local ssl = require "ssl"; local configmanager = require "core.configmanager"; local log = require "util.logger".init("certmanager"); -local ssl_context = ssl.context or softreq"ssl.context"; +local ssl_context = ssl.context or require "ssl.context"; local ssl_newcontext = ssl.newcontext; local new_config = require"util.sslconfig".new; local stat = require "lfs".attributes; @@ -48,7 +38,7 @@ local luasec_major, luasec_minor = ssl._VERSION:match("^(%d+)%.(%d+)"); local luasec_version = tonumber(luasec_major) * 100 + tonumber(luasec_minor); -local luasec_has = ssl.config or softreq"ssl.config" or { +local luasec_has = ssl.config or { algorithms = { ec = luasec_version >= 5; };
--- a/util/dependencies.lua Sat Dec 25 16:23:40 2021 +0100 +++ b/util/dependencies.lua Thu Feb 10 17:15:55 2022 +0100 @@ -85,7 +85,7 @@ { "Debian/Ubuntu", "sudo apt install lua-sec" }; { "luarocks", "luarocks install luasec" }; { "Source", "https://github.com/brunoos/luasec" }; - }, "SSL/TLS support will not be available", err); + }, nil, err); end local bit, err = softreq"util.bitcompat";