X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=core%2Fcertmanager.lua;h=b40c13c1c8951f906c353cef524cb50ca680cdab;hb=0ee742019c5a7a86de6fbaf98db2c737c5ce41a9;hp=3de3f7f7447c5311ee56c600cc6de3cae44bd924;hpb=69323a7d97405960d4144ea1cf8362ef017b66db;p=prosody.git diff --git a/core/certmanager.lua b/core/certmanager.lua index 3de3f7f7..b40c13c1 100644 --- a/core/certmanager.lua +++ b/core/certmanager.lua @@ -38,11 +38,11 @@ local luasec_major, luasec_minor = ssl._VERSION:match("^(%d+)%.(%d+)"); local luasec_version = luasec_major * 100 + luasec_minor; local luasec_has = { -- TODO If LuaSec ever starts exposing these things itself, use that instead - cipher_server_preference = true; + cipher_server_preference = luasec_version >= 2; no_ticket = luasec_version >= 4; no_compression = luasec_version >= 5; - single_dh_use = luasec_version >= 5; - single_ecdh_use = luasec_version >= 5; + single_dh_use = luasec_version >= 2; + single_ecdh_use = luasec_version >= 2; }; module "certmanager" @@ -53,6 +53,7 @@ local global_ssl_config = configmanager.get("*", "ssl"); -- Built-in defaults local core_defaults = { capath = "/etc/ssl/certs"; + depth = 9; protocol = "tlsv1+"; verify = (ssl_x509 and { "peer", "client_once", }) or "none"; options = { @@ -70,7 +71,7 @@ local path_options = { -- These we pass through resolve_path() key = true, certificate = true, cafile = true, capath = true, dhparam = true } -if not luasec_has_verifyext and ssl_x509 then +if luasec_version < 5 and ssl_x509 then -- COMPAT mw/luasec-hg for i=1,#core_defaults.verifyext do -- Remove lsec_ prefix core_defaults.verify[#core_defaults.verify+1] = core_defaults.verifyext[i]:sub(6);