Software /
code /
prosody
Diff
core/certmanager.lua @ 3571:675d65036f31
certmanager, hostmanager, mod_tls: Move responsibility for creating per-host SSL contexts to mod_tls, meaning reloading certs is now as trivial as reloading mod_tls
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 06 Nov 2010 18:28:15 +0000 |
parent | 3540:bc139431830b |
child | 3609:954b1159f2f3 |
line wrap: on
line diff
--- a/core/certmanager.lua Sat Nov 06 03:46:19 2010 +0500 +++ b/core/certmanager.lua Sat Nov 06 18:28:15 2010 +0000 @@ -23,8 +23,8 @@ local default_ssl_config = configmanager.get("*", "core", "ssl"); local default_capath = "/etc/ssl/certs"; -function create_context(host, mode, config) - local user_ssl_config = config and config.core.ssl or default_ssl_config; +function create_context(host, mode, user_ssl_config) + user_ssl_config = user_ssl_config or default_ssl_config; if not ssl then return nil, "LuaSec (required for encryption) was not found"; end if not user_ssl_config then return nil, "No SSL/TLS configuration present for "..host; end