Diff

core/s2smanager.lua @ 4329:d8b2c97ae6ed

s2smanager: Update to newer luasec
author Paul Aurich <paul@darkrain42.org>
date Mon, 06 Dec 2010 21:46:50 -0800
parent 4307:332fc256c76e
child 4421:971a66627f7a
child 4493:cad62a675b60
line wrap: on
line diff
--- a/core/s2smanager.lua	Mon Dec 06 21:46:36 2010 -0800
+++ b/core/s2smanager.lua	Mon Dec 06 21:46:50 2010 -0800
@@ -401,11 +401,13 @@
 	end
 
 	if cert then
-		local chain_valid, err = conn:getpeerchainvalid()
+		local chain_valid, errors = conn:getpeerverification()
+		-- Is there any interest in printing out all/the number of errors here?
 		if not chain_valid then
+			(session.log or log)("debug", "certificate chain validation result: invalid");
 			session.cert_chain_status = "invalid";
-			(session.log or log)("debug", "certificate chain validation result: %s", err);
 		else
+			(session.log or log)("debug", "certificate chain validation result: valid");
 			session.cert_chain_status = "valid";
 
 			local host = session.direction == "incoming" and session.from_host or session.to_host