From 1cbe0cea9b54b640b79b7cf91633015750396318 Mon Sep 17 00:00:00 2001 From: Waqas Hussain Date: Fri, 23 Jul 2010 23:14:50 +0500 Subject: prosody.resolve_relative_path: Updated to take a parent path to resolve against. --- core/certmanager.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'core') diff --git a/core/certmanager.lua b/core/certmanager.lua index f640a430..eadddd78 100644 --- a/core/certmanager.lua +++ b/core/certmanager.lua @@ -15,6 +15,7 @@ local setmetatable, tostring = setmetatable, tostring; local prosody = prosody; local resolve_path = prosody.resolve_relative_path; +local config_path = prosody.paths.config; module "certmanager" @@ -31,11 +32,11 @@ function create_context(host, mode, config) local ssl_config = { mode = mode; protocol = user_ssl_config.protocol or "sslv23"; - key = resolve_path(user_ssl_config.key); + key = resolve_path(config_path, user_ssl_config.key); password = user_ssl_config.password; - certificate = resolve_path(user_ssl_config.certificate); - capath = resolve_path(user_ssl_config.capath or default_capath); - cafile = resolve_path(user_ssl_config.cafile); + certificate = resolve_path(config_path, user_ssl_config.certificate); + capath = resolve_path(config_path, user_ssl_config.capath or default_capath); + cafile = resolve_path(config_path, user_ssl_config.cafile); verify = user_ssl_config.verify or "none"; options = user_ssl_config.options or "no_sslv2"; ciphers = user_ssl_config.ciphers; -- cgit v1.2.3