Merge 0.7->trunk

Fri, 23 Jul 2010 09:22:27 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Fri, 23 Jul 2010 09:22:27 +0100
changeset 3400
502a634f0578
parent 3398
abc4a52aef02 (current diff)
parent 3399
3976bad56640 (diff)
child 3401
2387f35db5c8

Merge 0.7->trunk

core/certmanager.lua file | annotate | diff | comparison | revisions
--- 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

mercurial