Return more useful error if webserver is down

This commit is contained in:
Jamie Cameron
2012-01-25 14:29:28 -08:00
parent cc5f8feef5
commit 0de24cd09b
2 changed files with 3 additions and 1 deletions

View File

@@ -496,6 +496,7 @@ sslcert_file=From file on server
sslcert_eurl=Missing, invalid or non-SSL URL
sslcert_efile=Missing or invalid certificate file
sslcert_ecert=Could not get certificate
sslcert_edown=Web server is down
sslcert_days=Days before expiry to fail
sslcert_when=When expired
sslcert_mismatch=Also detect hostname mismatch?

View File

@@ -17,7 +17,8 @@ if ($_[0]->{'url'}) {
local $out = &backquote_with_timeout($cmd, 10);
if ($?) {
# Connection failed
return { 'up' => -1 };
return { 'up' => -1,
'desc' => $text{'sslcert_edown'} };
}
# Extract the cert part and save