Bug 1127339 - Assign a dedicated error code for SSLv3 in docshell. r=bz

This commit is contained in:
Masatoshi Kimura 2015-02-21 17:20:22 +09:00
parent 43f23d98e1
commit c584cd0cbb
2 changed files with 10 additions and 2 deletions

View File

@ -4975,8 +4975,15 @@ nsDocShell::DisplayLoadError(nsresult aError, nsIURI* aURI,
}
tsi = do_QueryInterface(securityInfo);
if (tsi) {
// Usually we should have aFailedChannel and get a detailed message
tsi->GetErrorMessage(getter_Copies(messageStr));
uint32_t securityState;
tsi->GetSecurityState(&securityState);
if (securityState & nsIWebProgressListener::STATE_USES_SSL_3) {
error.AssignLiteral("sslv3Used");
addHostPort = true;
} else {
// Usually we should have aFailedChannel and get a detailed message
tsi->GetErrorMessage(getter_Copies(messageStr));
}
} else {
// No channel, let's obtain the generic error message
if (nsserr) {

View File

@ -33,3 +33,4 @@ phishingBlocked=The website at %S has been reported as a web forgery designed to
cspBlocked=This page has a content security policy that prevents it from being loaded in this way.
corruptedContentError=The page you are trying to view cannot be shown because an error in the data transmission was detected.
remoteXUL=This page uses an unsupported technology that is no longer available by default.
sslv3Used=The safety of your data on %S could not be guaranteed because it uses SSLv3, a broken security protocol.