Diff

core/certmanager.lua @ 3400:502a634f0578

Merge 0.7->trunk
author Matthew Wild <mwild1@gmail.com>
date Fri, 23 Jul 2010 09:22:27 +0100
parent 3372:395f692b3182
parent 3399:3976bad56640
child 3402:dfc369314e53
line wrap: on
line diff
--- a/core/certmanager.lua	Thu Jul 22 13:19:37 2010 +0100
+++ b/core/certmanager.lua	Fri Jul 23 09:22:27 2010 +0100
@@ -25,7 +25,8 @@
 function create_context(host, mode, config)
 	local user_ssl_config = config and config.core.ssl or default_ssl_config;
 
-	if not(ssl and user_ssl_config) then return nil; end
+	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
 	
 	local ssl_config = {
 		mode = mode;
@@ -67,7 +68,6 @@
 		else
 			log("error", "SSL/TLS: Error initialising for host %s: %s", host, err );
 		end
-		ssl = false
         end
         return ctx, err;
 end