Commit a489f8ea authored by Patrick Brunschwig's avatar Patrick Brunschwig

fix for bug 502 - display warning if S/MIME on and drafts should be encrypted

parent d015d606
......@@ -1598,6 +1598,9 @@ Enigmail.msg = {
(gMsgCompose.compFields.securityInfo.signMessage ||
gMsgCompose.compFields.securityInfo.requireEncryptMessage)) {
// Determine if user wants to encrypt drafts
let doEncryptDrafts = this.identity.getBoolAttribute("autoEncryptDrafts");
switch (EnigmailCommon.getPref("mimePreferPgp")) {
case 0:
// prefer OpenPGP over S/MIME
......@@ -1610,12 +1613,18 @@ Enigmail.msg = {
if (doSign || doEncrypt) {
toolbarMsg += " " + EnigmailCommon.getString("msgCompose.toolbarTxt.smime");
}
if (doEncryptDrafts) {
toolbarMsg += " " + EnigmailCommon.getString("msgCompose.toolbarTxt.smimeNoDraftEncryption");
}
break;
case 2:
// prefer S/MIME over OpenPGP
encBroadcaster.setAttribute("disabled", "true");
signBroadcaster.setAttribute("disabled", "true");
toolbarMsg = EnigmailCommon.getString("msgCompose.toolbarTxt.smimeSignOrEncrypt");
if (doEncryptDrafts) {
toolbarMsg += " " + EnigmailCommon.getString("msgCompose.toolbarTxt.smimeNoDraftEncryption");
}
break;
}
......@@ -2680,7 +2689,7 @@ Enigmail.msg = {
if (testErrorMsgObj.value.search(s) >= 0) {
EnigmailCommon.alert(window,
EnigmailCommon.getString("saveDraftError")+ "\n\n" +
EnigmailCommon.getString("errorKeyUnusable", [ fromAddr ]));
EnigmailCommon.getString("errorOwnKeyUnusable", [ fromAddr ]));
return false;
}
}
......
......@@ -144,6 +144,7 @@ pgpMime_sMime.dlg.text=You have enabled PGP/MIME and S/MIME together. Unfortunat
pgpMime_sMime.dlg.pgpMime.button=Use &PGP/MIME
pgpMime_sMime.dlg.sMime.button=Use &S/MIME
errorKeyUnusable=The email address or key ID '%S' cannot be matched to a valid, not expired OpenPGP key.\nPlease ensure that you have a valid OpenPGP key, and that your account settings point to that key.
errorOwnKeyUnusable=The key ID '%S' configured for the current identity does not yield a usable OpenPGP key.\n\nPlease ensure that you have a valid, not expired OpenPGP key and that your account settings point to that key.\nIf your key is not expired, then check if you did set Owner trust to full or ultimate.
saveDraftError=Error while saving encrypted draft:
msgCompose.internalEncryptionError=Internal Error: promised encryption disabled
......@@ -156,6 +157,7 @@ msgCompose.toolbarTxt.disabled=Enigmail is disabled for the selected identity
msgCompose.toolbarTxt.smime=: S/MIME is enabled - potentially conflicting with Enigmail
msgCompose.toolbarTxt.smimeOff= - S/MIME is therefore not used
msgCompose.toolbarTxt.smimeSignOrEncrypt=S/MIME is enabled - Enigmail is therefore not used
msgCompose.toolbarTxt.smimeNoDraftEncryption=Drafts will not be encrypted!
# note: should end with double newline:
sendAborted=Send operation aborted.\n\n
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment