+ -- LuaSec expects dhparam to be a callback that takes two arguments.
+ -- We ignore those because it is mostly used for having a separate
+ -- set of params for EXPORT ciphers, which we don't have by default.
+ if type(ssl_config.dhparam) == "string" then
+ local f, err = io_open(resolve_path(config_path, ssl_config.dhparam));
+ if not f then return nil, "Could not open DH parameters: "..err end
+ local dhparam = f:read("*a");
+ f:close();
+ ssl_config.dhparam = function() return dhparam; end
+ end
+