# HG changeset patch # User Kim Alvefur # Date 1511134001 -3600 # Node ID ca52d40e74daf1cd1f027b4bd96ce700c7bc785a # Parent ba39d3a1d42e672fe25d3435ed34fb388d753ead certmanager: Filter out curves not supported by LuaSec diff -r ba39d3a1d42e -r ca52d40e74da core/certmanager.lua --- a/core/certmanager.lua Mon Nov 20 00:25:18 2017 +0100 +++ b/core/certmanager.lua Mon Nov 20 00:26:41 2017 +0100 @@ -27,6 +27,7 @@ local tonumber, tostring = tonumber, tostring; local pairs = pairs; +local t_remove = table.remove; local type = type; local io_open = io.open; local select = select; @@ -131,6 +132,17 @@ "!aNULL", -- Ciphers that does not authenticate the connection }; } + +if luasec_has.curves then + for i = #core_defaults.curveslist, 1, -1 do + if not luasec_has.curves[ core_defaults.curveslist[i] ] then + t_remove(core_defaults.curveslist, i); + end + end +else + core_defaults.curveslist = nil; +end + local path_options = { -- These we pass through resolve_path() key = true, certificate = true, cafile = true, capath = true, dhparam = true }