Bug 738457 - useful error message for MD5 certs, general fallback to NSS's default (english) error message, r=wtc

This commit is contained in:
Kai Engert 2012-04-27 01:47:19 +02:00
parent 26b832feb9
commit 2c4461eba2

View File

@ -98,7 +98,18 @@ nsNSSErrors::getErrorMessageFromCode(PRErrorCode err,
returnedMessage.Append(defMsg);
returnedMessage.Append(NS_LITERAL_STRING("\n"));
}
}
if (returnedMessage.IsEmpty())
{
// no localized string available, use NSS' internal
returnedMessage.AppendASCII(PR_ErrorToString(err, PR_LANGUAGE_EN));
returnedMessage.Append(NS_LITERAL_STRING("\n"));
}
if (nss_error_id_str)
{
nsresult rv;
nsCString error_id(nss_error_id_str);
ToLowerCase(error_id);
NS_ConvertASCIItoUTF16 idU(error_id);