Changeset

2739:7339c2720b39

certmanager: Friendlier error reporting on OpenWRT and other cases where we don't understand the OpenSSL error
author Matthew Wild <mwild1@gmail.com>
date Fri, 05 Mar 2010 15:00:11 +0000
parents 2738:e253dd4714d5
children 2740:2442c54cf9ec
files core/certmanager.lua
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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