Bug 420246, gBrowser.securityUI doesn't clear invalid cert data after using back button
r=rrelyea, r=johnath, sr=gavin, blocking1.9=beltzner git-svn-id: svn://10.0.0.236/trunk@248993 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -68,13 +68,15 @@ var security = {
|
||||
return null;
|
||||
|
||||
var isBroken =
|
||||
(ui.state == Components.interfaces.nsIWebProgressListener.STATE_IS_BROKEN);
|
||||
(ui.state & Components.interfaces.nsIWebProgressListener.STATE_IS_BROKEN);
|
||||
var isInsecure =
|
||||
(ui.state & Components.interfaces.nsIWebProgressListener.STATE_IS_INSECURE);
|
||||
var isEV =
|
||||
(ui.state & Components.interfaces.nsIWebProgressListener.STATE_IDENTITY_EV_TOPLEVEL);
|
||||
ui.QueryInterface(nsISSLStatusProvider);
|
||||
var status = ui.SSLStatus;
|
||||
|
||||
if (status) {
|
||||
if (!isInsecure && status) {
|
||||
status.QueryInterface(nsISSLStatus);
|
||||
var cert = status.serverCert;
|
||||
var issuerName =
|
||||
|
||||
@@ -1441,6 +1441,22 @@ nsSecureBrowserUIImpl::GetSSLStatus(nsISupports** _result)
|
||||
NS_ENSURE_ARG_POINTER(_result);
|
||||
|
||||
nsAutoMonitor lock(mMonitor);
|
||||
|
||||
switch (mNotifiedSecurityState)
|
||||
{
|
||||
case lis_mixed_security:
|
||||
case lis_low_security:
|
||||
case lis_high_security:
|
||||
break;
|
||||
|
||||
default:
|
||||
NS_NOTREACHED("if this is reached you must add more entries to the switch");
|
||||
case lis_no_security:
|
||||
case lis_broken_security:
|
||||
*_result = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
*_result = mSSLStatus;
|
||||
NS_IF_ADDREF(*_result);
|
||||
|
||||
|
||||
@@ -88,10 +88,12 @@
|
||||
var sp = null;
|
||||
var isBroken = false;
|
||||
if (ui) {
|
||||
isBroken = (ui.state == Components.interfaces.nsIWebProgressListener.STATE_IS_BROKEN);
|
||||
sp = ui.QueryInterface(nsISSLStatusProvider);
|
||||
if (sp)
|
||||
status = sp.SSLStatus;
|
||||
isBroken = (ui.state & Components.interfaces.nsIWebProgressListener.STATE_IS_BROKEN);
|
||||
if (!(ui.state & Components.interfaces.nsIWebProgressListener.STATE_IS_INSECURE)) {
|
||||
sp = ui.QueryInterface(nsISSLStatusProvider);
|
||||
if (sp)
|
||||
status = sp.SSLStatus;
|
||||
}
|
||||
}
|
||||
if (status) {
|
||||
status = status.QueryInterface(nsISSLStatus);
|
||||
|
||||
Reference in New Issue
Block a user