certmanager: Fix to handle the case of no SSL configuration at all

Wed, 14 Jul 2010 16:24:15 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Wed, 14 Jul 2010 16:24:15 +0100
changeset 3370
7c87af1c9a68
parent 3369
9a96969d4670
child 3372
395f692b3182

certmanager: Fix to handle the case of no SSL configuration at all

core/certmanager.lua file | annotate | diff | comparison | revisions
--- a/core/certmanager.lua	Thu Jul 15 11:28:31 2010 +0500
+++ b/core/certmanager.lua	Wed Jul 14 16:24:15 2010 +0100
@@ -23,9 +23,9 @@
 local default_capath = "/etc/ssl/certs";
 
 function create_context(host, mode, config)
-	if not ssl then return nil; end
-	
 	local user_ssl_config = config and config.core.ssl or default_ssl_config;
+
+	if not(ssl and user_ssl_config) then return nil; end
 	
 	local ssl_config = {
 		mode = mode;

mercurial