certmanager: Friendlier error reporting on OpenWRT and other cases where we don't understand the OpenSSL error

Fri, 05 Mar 2010 15:00:11 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Fri, 05 Mar 2010 15:00:11 +0000
changeset 2738
7339c2720b39
parent 2737
e253dd4714d5
child 2739
2442c54cf9ec

certmanager: Friendlier error reporting on OpenWRT and other cases where we don't understand the OpenSSL error

core/certmanager.lua file | annotate | diff | comparison | revisions
--- a/core/certmanager.lua	Fri Mar 05 14:49:56 2010 +0000
+++ b/core/certmanager.lua	Fri Mar 05 15:00:11 2010 +0000
@@ -39,8 +39,10 @@
 					reason = "Check that the path is correct, and the file exists.";
 				elseif reason == "system lib" then
 					reason = "Previous error (see logs), or other system error.";
+				elseif reason == "(null)" or not reason then
+					reason = "Check that the file exists and the permissions are correct";
 				else
-					reason = "Reason: "..tostring(reason or "unknown"):lower();
+					reason = "Reason: "..tostring(reason):lower();
 				end
 				log("error", "SSL/TLS: Failed to load %s: %s", file, reason);
 			else

mercurial