зеркало из https://github.com/mozilla/gecko-dev.git
Bug 886752 - Show TLS/SSL version in page info dialog. r=dao
This commit is contained in:
Родитель
cba793218d
Коммит
0130a12af3
|
@ -52,19 +52,37 @@ var security = {
|
|||
cAName : issuerName,
|
||||
encryptionAlgorithm : undefined,
|
||||
encryptionStrength : undefined,
|
||||
version: undefined,
|
||||
isBroken : isBroken,
|
||||
isEV : isEV,
|
||||
cert : cert,
|
||||
fullLocation : gWindow.location
|
||||
};
|
||||
|
||||
var version;
|
||||
try {
|
||||
retval.encryptionAlgorithm = status.cipherName;
|
||||
retval.encryptionStrength = status.secretKeyLength;
|
||||
version = status.protocolVersion;
|
||||
}
|
||||
catch (e) {
|
||||
}
|
||||
|
||||
switch (version) {
|
||||
case nsISSLStatus.SSL_VERSION_3:
|
||||
retval.version = "SSL 3";
|
||||
break;
|
||||
case nsISSLStatus.TLS_VERSION_1:
|
||||
retval.version = "TLS 1.0";
|
||||
break;
|
||||
case nsISSLStatus.TLS_VERSION_1_1:
|
||||
retval.version = "TLS 1.1";
|
||||
break;
|
||||
case nsISSLStatus.TLS_VERSION_1_2:
|
||||
retval.version = "TLS 1.2"
|
||||
break;
|
||||
}
|
||||
|
||||
return retval;
|
||||
} else {
|
||||
return {
|
||||
|
@ -72,6 +90,7 @@ var security = {
|
|||
cAName : "",
|
||||
encryptionAlgorithm : "",
|
||||
encryptionStrength : 0,
|
||||
version: "",
|
||||
isBroken : isBroken,
|
||||
isEV : isEV,
|
||||
cert : null,
|
||||
|
@ -239,15 +258,19 @@ function securityOnLoad() {
|
|||
msg2 = pkiBundle.getString("pageInfo_Privacy_None2");
|
||||
}
|
||||
else if (info.encryptionStrength >= 90) {
|
||||
hdr = pkiBundle.getFormattedString("pageInfo_StrongEncryptionWithBits",
|
||||
[info.encryptionAlgorithm, info.encryptionStrength + ""]);
|
||||
hdr = pkiBundle.getFormattedString("pageInfo_StrongEncryptionWithBitsAndProtocol",
|
||||
[info.encryptionAlgorithm,
|
||||
info.encryptionStrength + "",
|
||||
info.version]);
|
||||
msg1 = pkiBundle.getString("pageInfo_Privacy_Strong1");
|
||||
msg2 = pkiBundle.getString("pageInfo_Privacy_Strong2");
|
||||
security._cert = info.cert;
|
||||
}
|
||||
else if (info.encryptionStrength > 0) {
|
||||
hdr = pkiBundle.getFormattedString("pageInfo_WeakEncryptionWithBits",
|
||||
[info.encryptionAlgorithm, info.encryptionStrength + ""]);
|
||||
hdr = pkiBundle.getFormattedString("pageInfo_WeakEncryptionWithBitsAndProtocol",
|
||||
[info.encryptionAlgorithm,
|
||||
info.encryptionStrength + "",
|
||||
info.version]);
|
||||
msg1 = pkiBundle.getFormattedString("pageInfo_Privacy_Weak1", [info.hostName]);
|
||||
msg2 = pkiBundle.getString("pageInfo_Privacy_Weak2");
|
||||
}
|
||||
|
|
|
@ -73,14 +73,16 @@ 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_StrongEncryptionWithBits): %1$S is the name of the encryption standard,
|
||||
# LOCALIZATION NOTE (pageInfo_StrongEncryptionWithBitsAndProtocol): %1$S is the name of the encryption standard,
|
||||
# %2$S is the key size of the cipher.
|
||||
pageInfo_StrongEncryptionWithBits=Connection Encrypted: High-grade Encryption (%1$S, %2$S bit keys)
|
||||
# %3$S is protocol version like "SSL 3" or "TLS 1.2"
|
||||
pageInfo_StrongEncryptionWithBitsAndProtocol=Connection Encrypted: High-grade Encryption (%1$S, %2$S bit keys, %3$S)
|
||||
pageInfo_Privacy_Strong1=The page you are viewing was encrypted before being transmitted over the Internet.
|
||||
pageInfo_Privacy_Strong2=Encryption makes it very difficult for unauthorized people to view information traveling between computers. It is therefore very unlikely that anyone read this page as it traveled across the network.
|
||||
# LOCALIZATION NOTE (pageInfo_WeakEncryptionWithBits): %1$S is the name of the encryption standard,
|
||||
# %2$S is the key size of the cipher.
|
||||
pageInfo_WeakEncryptionWithBits=Connection Encrypted: Low-grade Encryption (%1$S, %2$S bit keys)
|
||||
# %3$S is protocol version like "SSL 3" or "TLS 1.2"
|
||||
pageInfo_WeakEncryptionWithBitsAndProtocol=Connection Encrypted: Low-grade Encryption (%1$S, %2$S bit keys, %3$S)
|
||||
pageInfo_Privacy_Weak1=The website %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
|
||||
|
|
Загрузка…
Ссылка в новой задаче