# HG changeset patch # User Matthew Wild # Date 1266078092 0 # Node ID a461c682f67d3ea52a3897ca819a8699078e6d5a # Parent 77f135c7689a33b61ec9c88e3590c070d349db2e prosody: Use certmanager to create the global SSL context diff -r 77f135c7689a -r a461c682f67d prosody --- a/prosody Sat Feb 13 16:12:53 2010 +0000 +++ b/prosody Sat Feb 13 16:21:32 2010 +0000 @@ -186,12 +186,9 @@ end -- Load SSL settings from config, and create a ctx table - local global_ssl_ctx = rawget(_G, "ssl") and config.get("*", "core", "ssl"); - if global_ssl_ctx then - local default_ssl_ctx = { mode = "server", protocol = "sslv23", capath = "/etc/ssl/certs", verify = "none", options = "no_sslv2" }; - setmetatable(global_ssl_ctx, { __index = default_ssl_ctx }); - prosody.global_ssl_ctx = global_ssl_ctx; - end + local certmanager = require "core.certmanager"; + local global_ssl_ctx = certmanager.create_context("*", "server"); + prosody.global_ssl_ctx = global_ssl_ctx; local cl = require "net.connlisteners"; function prosody.net_activate_ports(option, listener, default, conntype)