b=185749 Give correct message security info when not using an encryption cert

r=javi sr=bienvenu
This commit is contained in:
kaie%netscape.com 2002-12-18 12:55:36 +00:00
parent 5245de3429
commit 4bc7f1ad7e
2 changed files with 4 additions and 9 deletions

View File

@ -276,15 +276,9 @@ function showMessageComposeSecurityStatus()
{ {
Recipients2CompFields(gMsgCompose.compFields); Recipients2CompFields(gMsgCompose.compFields);
var areCertsAvailable = false;
var encryptionCertName = gCurrentIdentity.getUnicharAttribute("encryption_cert_name"); var encryptionCertName = gCurrentIdentity.getUnicharAttribute("encryption_cert_name");
var signingCertName = gCurrentIdentity.getUnicharAttribute("signing_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', window.openDialog('chrome://messenger-smime/content/msgCompSecurityInfo.xul',
'', '',
'chrome,resizable=1,modal=1,dialog=1', 'chrome,resizable=1,modal=1,dialog=1',
@ -292,7 +286,8 @@ function showMessageComposeSecurityStatus()
compFields : gMsgCompose.compFields, compFields : gMsgCompose.compFields,
subject : GetMsgSubjectElement().value, subject : GetMsgSubjectElement().value,
smFields : gSMFields, smFields : gSMFields,
certsAvailable : areCertsAvailable, isSigningCertAvailable : (signingCertName.length > 0),
isEncryptionCertAvailable : (encryptionCertName.length > 0),
currentIdentity : gCurrentIdentity currentIdentity : gCurrentIdentity
} }
); );

View File

@ -193,7 +193,7 @@ function onLoad()
if (params.smFields.requireEncryptMessage) if (params.smFields.requireEncryptMessage)
{ {
if (params.certsAvailable && canEncrypt.value) if (params.isEncryptionCertAvailable && canEncrypt.value)
{ {
encrypted_element.value = yes_string; encrypted_element.value = yes_string;
} }
@ -209,7 +209,7 @@ function onLoad()
if (params.smFields.signMessage) if (params.smFields.signMessage)
{ {
if (params.certsAvailable) if (params.isSigningCertAvailable)
{ {
signed_element.value = yes_string; signed_element.value = yes_string;
} }