aboutsummaryrefslogtreecommitdiffstats
path: root/core/certmanager.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2013-09-03 13:40:29 +0200
committerKim Alvefur <zash@zash.se>2013-09-03 13:40:29 +0200
commitfef357b9837708669391538d02332da1cf41044f (patch)
treebcf473d9e9d607002ea2fc763787022b9b623708 /core/certmanager.lua
parent62e1985a37122c772085a1110ee594a5621cb9e1 (diff)
downloadprosody-fef357b9837708669391538d02332da1cf41044f.tar.gz
prosody-fef357b9837708669391538d02332da1cf41044f.zip
certmanager: Fix dhparam callback, missing imports (Testing, pfft)vault/0.9.1
Diffstat (limited to 'core/certmanager.lua')
-rw-r--r--core/certmanager.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/core/certmanager.lua b/core/certmanager.lua
index c1ce468d..350fb837 100644
--- a/core/certmanager.lua
+++ b/core/certmanager.lua
@@ -12,6 +12,8 @@ local ssl = ssl;
local ssl_newcontext = ssl and ssl.newcontext;
local tostring = tostring;
+local type = type;
+local io_open = io.open;
local prosody = prosody;
local resolve_path = configmanager.resolve_relative_path;
@@ -75,12 +77,12 @@ function create_context(host, mode, user_ssl_config)
-- 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(user_ssl_config.dhparam) == "string" then
- local f, err = io_open(resolve_path(user_ssl_config.dhparam));
+ 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();
- user_ssl_config.dhparam = function() return dhparam; end
+ ssl_config.dhparam = function() return dhparam; end
end
local ctx, err = ssl_newcontext(ssl_config);