Bug 263182: Page Info (Security tab) doesn't explain mixed secure/insecure, r=kaie.bugs, sr=neil.parkwaycc.co.uk

git-svn-id: svn://10.0.0.236/trunk@179095 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
gavin%gavinsharp.com 2005-08-26 20:34:31 +00:00
parent 3ed46bc309
commit a97654d8d3
2 changed files with 16 additions and 1 deletions

View File

@ -123,6 +123,8 @@ pageInfo_Privacy_Strong2=Encryption makes it very difficult for unauthorized peo
pageInfo_WeakEncryption=Connection Encrypted: Low-grade Encryption (%S %S bit)
pageInfo_Privacy_Weak1=The web site %S is using low-grade encryption for the page you are viewing.
pageInfo_Privacy_Weak2=Low-grade encryption may allow some unauthorized people to view this information.
pageInfo_MixedContent=Connection Partially Encrypted
pageInfo_Privacy_Mixed1=Parts of the page you are viewing were not encrypted before being transmitted over the Internet.
#Cert Viewer
certDetails=Certificate Viewer:

View File

@ -84,7 +84,9 @@
var ui = security._getSecurityUI();
var status = null;
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;
@ -104,6 +106,7 @@
cAName : issuerName,
encryptionAlgorithm : status.cipherName,
encryptionStrength : status.secretKeyLength,
isBroken : isBroken,
cert : cert
};
} else {
@ -112,6 +115,7 @@
cAName : "",
encryptionAlgorithm : "",
encryptionStrength : 0,
isBroken : isBroken,
cert : null
};
}
@ -179,7 +183,16 @@
var msg2;
/* Set the encryption messages */
if (info.encryptionStrength >= 90) {
if (info.isBroken) {
hdr = bundle.GetStringFromName("pageInfo_MixedContent");
setText("security-privacy", hdr);
msg1 = bundle.GetStringFromName("pageInfo_Privacy_Mixed1");
setText("security-privacy-msg1", msg1);
msg2 = bundle.GetStringFromName("pageInfo_Privacy_None2");
setText("security-privacy-msg2", msg2);
} else if (info.encryptionStrength >= 90) {
hdr = bundle.formatStringFromName("pageInfo_StrongEncryption",
[ info.encryptionAlgorithm, info.encryptionStrength+"" ], 2);
setText("security-privacy", hdr);