mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 04:15:43 +00:00
b=185749 Give correct message security info when not using an encryption cert
r=javi sr=bienvenu
This commit is contained in:
parent
5245de3429
commit
4bc7f1ad7e
@ -276,15 +276,9 @@ function showMessageComposeSecurityStatus()
|
||||
{
|
||||
Recipients2CompFields(gMsgCompose.compFields);
|
||||
|
||||
var areCertsAvailable = false;
|
||||
var encryptionCertName = gCurrentIdentity.getUnicharAttribute("encryption_cert_name");
|
||||
var signingCertName = gCurrentIdentity.getUnicharAttribute("signing_cert_name");
|
||||
|
||||
if (encryptionCertName.length > 0 && signingCertName.length > 0 )
|
||||
{
|
||||
areCertsAvailable = true;
|
||||
}
|
||||
|
||||
window.openDialog('chrome://messenger-smime/content/msgCompSecurityInfo.xul',
|
||||
'',
|
||||
'chrome,resizable=1,modal=1,dialog=1',
|
||||
@ -292,7 +286,8 @@ function showMessageComposeSecurityStatus()
|
||||
compFields : gMsgCompose.compFields,
|
||||
subject : GetMsgSubjectElement().value,
|
||||
smFields : gSMFields,
|
||||
certsAvailable : areCertsAvailable,
|
||||
isSigningCertAvailable : (signingCertName.length > 0),
|
||||
isEncryptionCertAvailable : (encryptionCertName.length > 0),
|
||||
currentIdentity : gCurrentIdentity
|
||||
}
|
||||
);
|
||||
|
@ -193,7 +193,7 @@ function onLoad()
|
||||
|
||||
if (params.smFields.requireEncryptMessage)
|
||||
{
|
||||
if (params.certsAvailable && canEncrypt.value)
|
||||
if (params.isEncryptionCertAvailable && canEncrypt.value)
|
||||
{
|
||||
encrypted_element.value = yes_string;
|
||||
}
|
||||
@ -209,7 +209,7 @@ function onLoad()
|
||||
|
||||
if (params.smFields.signMessage)
|
||||
{
|
||||
if (params.certsAvailable)
|
||||
if (params.isSigningCertAvailable)
|
||||
{
|
||||
signed_element.value = yes_string;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user