Bug 1126413 - Part 2: UI changes to display security info on broken secure pages. r=dolske

This commit is contained in:
Masatoshi Kimura 2015-02-10 04:16:23 +09:00
Родитель 8573fc1f7e
Коммит c199c43026
2 изменённых файлов: 17 добавлений и 3 удалений

Просмотреть файл

@ -34,7 +34,10 @@ var security = {
var isBroken =
(ui.state & Components.interfaces.nsIWebProgressListener.STATE_IS_BROKEN);
var isInsecure =
var isMixed =
(ui.state & (Components.interfaces.nsIWebProgressListener.STATE_LOADED_MIXED_ACTIVE_CONTENT |
Components.interfaces.nsIWebProgressListener.STATE_LOADED_MIXED_DISPLAY_CONTENT));
var isInsecure =
(ui.state & Components.interfaces.nsIWebProgressListener.STATE_IS_INSECURE);
var isEV =
(ui.state & Components.interfaces.nsIWebProgressListener.STATE_IDENTITY_EV_TOPLEVEL);
@ -54,6 +57,7 @@ var security = {
encryptionStrength : undefined,
version: undefined,
isBroken : isBroken,
isMixed : isMixed,
isEV : isEV,
cert : cert,
fullLocation : gWindow.location
@ -92,6 +96,7 @@ var security = {
encryptionStrength : 0,
version: "",
isBroken : isBroken,
isMixed : isMixed,
isEV : isEV,
cert : null,
fullLocation : gWindow.location
@ -253,7 +258,14 @@ function securityOnLoad() {
var msg2;
if (info.isBroken) {
hdr = pkiBundle.getString("pageInfo_MixedContent");
if (info.isMixed) {
hdr = pkiBundle.getString("pageInfo_MixedContent");
} else {
hdr = pkiBundle.getFormattedString("pageInfo_BrokenEncryption",
[info.encryptionAlgorithm,
info.encryptionStrength + "",
info.version]);
}
msg1 = pkiBundle.getString("pageInfo_Privacy_Broken1");
msg2 = pkiBundle.getString("pageInfo_Privacy_None2");
}

Просмотреть файл

@ -73,10 +73,12 @@ pageInfo_NoEncryption=Connection Not Encrypted
pageInfo_Privacy_None1=The website %S does not support encryption for the page you are viewing.
pageInfo_Privacy_None2=Information sent over the Internet without encryption can be seen by other people while it is in transit.
pageInfo_Privacy_None3=The page you are viewing is not encrypted.
# LOCALIZATION NOTE (pageInfo_EncryptionWithBitsAndProtocol): %1$S is the name of the encryption standard,
# LOCALIZATION NOTE (pageInfo_EncryptionWithBitsAndProtocol and pageInfo_BrokenEncryption):
# %1$S is the name of the encryption standard,
# %2$S is the key size of the cipher.
# %3$S is protocol version like "SSL 3" or "TLS 1.2"
pageInfo_EncryptionWithBitsAndProtocol=Connection Encrypted (%1$S, %2$S bit keys, %3$S)
pageInfo_BrokenEncryption=Broken Encryption (%1$S, %2$S bit keys, %3$S)
pageInfo_Privacy_Encrypted1=The page you are viewing was encrypted before being transmitted over the Internet.
pageInfo_Privacy_Encrypted2=Encryption makes it difficult for unauthorized people to view information traveling between computers. It is therefore unlikely that anyone read this page as it traveled across the network.
pageInfo_MixedContent=Connection Partially Encrypted