# Trustedbird Configuration File
-mk_add_options MOZ_MAKE_FLAGS="-j3"
+mk_add_options MOZ_MAKE_FLAGS="-j1"
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj
mk_add_options MOZ_BUILD_PROJECTS="mail"
ac_add_options --enable-application=mail
ac_add_options --enable-static
ac_add_options --enable-optimize
-ac_add_options --enable-jemalloc
+ac_add_options --disable-jemalloc
ac_add_options --enable-svg
ac_add_options --disable-tests
ac_add_options --disable-crashreporter
ac_add_options --disable-debug
ac_add_options --disable-shared
-ac_add_options --with-windows-version=502
+ac_add_options --with-windows-version=600
}
/* Security Label */
- if (params.smFields.securityPolicyIdentifier != "") {
- if (params.smFields.securityClassification != -1) {
- securityLabel_element.value = securityLabelGetSecurityClassificationName(params.smFields.securityPolicyIdentifier, params.smFields.securityClassification)
- + " [" + securityLabelGetSecurityPolicyIdentifierName(params.smFields.securityPolicyIdentifier) + "]";
- } else {
- securityLabel_element.value = "[" + securityLabelGetSecurityPolicyIdentifierName(params.smFields.securityPolicyIdentifier) + "]";
- }
- } else {
- securityLabel_element.value = no_string;
+ if (params.smFields.securityPolicyIdentifier != "")
+ {
+ var tSecurityLabelConf = new securityLabelConf();;
+ var securityLabelValue = "";
+ if (params.smFields.securityClassification != -1)
+ securityLabelValue = tSecurityLabelConf.getSecurityClassificationName(params.smFields.securityPolicyIdentifier, params.smFields.securityClassification) + " ";
+
+ securityLabelValue += "[" + tSecurityLabelConf.getSecurityPolicyIdentifierName(params.smFields.securityPolicyIdentifier) + "]";
+ securityLabel_element.value = securityLabelValue;
}
+ else
+ securityLabel_element.value = no_string;
+
+ }
}
var imax = gCount.value;
function doHelpButton()
{
- openHelp('compose_security');
+ openHelp('compose_security', 'chrome://communicator/locale/help/suitehelp.rdf');
}
function createCell(label)
var gNextSecurityButtonCommand = "";
var gSMFields = null;
+var gEncryptOptionChanged;
+var gSignOptionChanged;
+
+var gSecurityLabelConf = null;
+
function onComposerClose()
{
gSMFields = null;
setNoEncryptionUI();
setNoSignatureUI();
+ setSecurityLabelStatusBarUI();
if (!gMsgCompose || !gMsgCompose.compFields)
return;
setSignatureUI();
else
setNoSignatureUI();
+
+ if (gSMFields.signMessage)
+ gSMFields.SMIMEReceiptRequest = gCurrentIdentity.getBoolAttribute("smime_receipt_request");
+
+ setSecurityLabelStatusBarUI();
}
addEventListener("load", smimeComposeOnLoad, false);
return;
}
+ gSMFields.SMIMEReceiptRequest = gCurrentIdentity.getBoolAttribute("smime_receipt_request");
+
setSignatureUI();
}
else
{
+ gSMFields.SMIMEReceiptRequest = false;
+
+ gSMFields.securityPolicyIdentifier = "";
+ setSecurityLabelStatusBarUI();
setNoSignatureUI();
}
+
+ gSignOptionChanged = true;
+}
+
+function toggleSMIMEReceiptRequest()
+{
+ if (!gSMFields)
+ return;
+
+ gSMFields.SMIMEReceiptRequest = !gSMFields.SMIMEReceiptRequest;
+
+ if (gSMFields.SMIMEReceiptRequest)
+ {
+ var signingCertName = gCurrentIdentity.getUnicharAttribute("signing_cert_name");
+
+ if (!signingCertName)
+ {
+ gSMFields.SMIMEReceiptRequest = false;
+ showNeedSetupInfo();
+ return;
+ }
+
+ // Force signing
+ gSMFields.signMessage = true;
+
+ setSignatureUI();
+ }
}
function setSecuritySettings(menu_id)
.setAttribute("checked", !gSMFields.requireEncryptMessage);
document.getElementById("menu_securitySign" + menu_id)
.setAttribute("checked", gSMFields.signMessage);
+ document.getElementById("menu_securitySMIMEReceiptRequest" + menu_id)
+ .setAttribute("checked", gSMFields.SMIMEReceiptRequest);
}
function setNextCommand(what)
signMessage();
break;
+ case "SMIMEReceiptRequest":
+ toggleSMIMEReceiptRequest();
+ break;
+
+ case "securityLabelDialog":
+ showSecurityLabelDialog();
+ break;
+
case "show":
default:
showMessageComposeSecurityStatus();
setNoSignatureUI();
}
}
+
+/**
+ * Show a dialog to define Security Label settings
+ */
+function showSecurityLabelDialog() {
+ window.openDialog('chrome://messenger-smime/content/msgCompSecurityLabelDialog.xul', '', 'chrome,resizable=yes,titlebar,modal,width=500,height=350');
+
+ /* make sure we have a cert name for signing */
+ if (gSMFields.securityPolicyIdentifier != "")
+ {
+ var signingCertName = gCurrentIdentity.getUnicharAttribute("signing_cert_name");
+ if (!signingCertName)
+ {
+ gSMFields.securityPolicyIdentifier = "";
+ setSecurityLabelStatusBarUI();
+ showNeedSetupInfo();
+ return;
+ }
+
+ // Enable signing if disabled
+ if (!gSMFields.signMessage)
+ toggleSignMessage();
+ }
+
+ setSecurityLabelStatusBarUI();
+}
+
+/**
+ * Display Security Label info in status bar of compose window
+ */
+function setSecurityLabelStatusBarUI() {
+ if (!gSMFields || gSMFields.securityPolicyIdentifier == "") {
+ top.document.getElementById("securityLabel-status").label = "";
+ top.document.getElementById("securityLabel-status").collapsed = true;
+ return;
+ }
+
+ if (!gSecurityLabelConf)
+ gSecurityLabelConf = new securityLabelConf();
+
+ var securityLabelValue = "";
+
+ if (gSMFields.securityClassification != -1)
+ securityLabelValue = gSecurityLabelConf.getSecurityClassificationName(gSMFields.securityPolicyIdentifier, gSMFields.securityClassification) + " ";
+
+ securityLabelValue += "[" + gSecurityLabelConf.getSecurityPolicyIdentifierName(gSMFields.securityPolicyIdentifier) + "]";
+ top.document.getElementById("securityLabel-status").label = securityLabelValue;
+ top.document.getElementById("securityLabel-status").collapsed = false;
+}
<overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/javascript" src="chrome://messenger-smime/content/msgCompSMIMEOverlay.js"/>
+ <script type="application/javascript" src="chrome://messenger-smime/content/msgSecurityLabel.js"/>
<window id="msgcomposeWindow">
<broadcaster id="securityStatus" crypto="" signing=""/>
accesskey="&menu_securityEncryptRequire.accesskey;" label="&menu_securityEncryptRequire.label;" oncommand="encryptMessage()"/>
<menuseparator/>
<menuitem id="menu_securitySign1" type="checkbox" accesskey="&menu_securitySign.accesskey;" label="&menu_securitySign.label;" oncommand="signMessage()"/>
+ menuitem id="menu_securitySMIMEReceiptRequest1"
+ type="checkbox"
+ label="&menu_securitySMIMEReceiptRequest.label;"
+ accesskey="&menu_securitySMIMEReceiptRequest.accesskey;"
+ oncommand="toggleSMIMEReceiptRequest()"/>
+
+ <menuseparator id="menu_securityLabelDialogSeparator1"/>
+ <menuitem id="menu_securityLabelDialog1"
+ label="&menu_securityLabel.label;"
+ accesskey="&menu_securityLabel.accesskey;"
+ oncommand="showSecurityLabelDialog();"/>
</menupopup>
</menu>
+ <
</menupopup>
<toolbarpalette id="MsgComposeToolbarPalette">
accesskey="&menu_securityEncryptRequire.accesskey;" label="&menu_securityEncryptRequire.label;" oncommand="setNextCommand('encryptMessage')"/>
<menuseparator/>
<menuitem id="menu_securitySign2" type="checkbox" accesskey="&menu_securitySign.accesskey;" label="&menu_securitySign.label;" oncommand="setNextCommand('signMessage');"/>
- <menuseparator/>
+ <menuitem id="menu_securitySMIMEReceiptRequest2"
+ type="checkbox"
+ label="&menu_securitySMIMEReceiptRequest.label;"
+ accesskey="&menu_securitySMIMEReceiptRequest.accesskey;"
+ oncommand="setNextCommand('SMIMEReceiptRequest');"/>
+ <menuseparator id="menu_securityLabelDialogSeparator2"/>
+ <menuitem id="menu_securityLabelDialog2"
+ label="&menu_securityLabel.label;"
+ accesskey="&menu_securityLabel.accesskey;"
+ oncommand="setNextCommand('securityLabelDialog');"/>
+ <menuseparator id="smimeToolbarButtonSeparator"/>
<menuitem id="menu_securityStatus2" accesskey="&menu_securityStatus.accesskey;" label="&menu_securityStatus.label;" oncommand="setNextCommand('show');"/>
</menupopup>
</toolbarbutton>
<statusbar id="status-bar">
<statusbarpanel insertbefore="offline-status" class="statusbarpanel-iconic" collapsed="true"
id="signing-status" oncommand="showMessageComposeSecurityStatus();"/>
+ <statusbarpanel insertbefore="offline-status" class="statusbarpanel-text" collapsed="true"
+ id="securityLabel-status" onclick="showSecurityLabelDialog();"/>
<statusbarpanel insertbefore="offline-status" class="statusbarpanel-iconic" collapsed="true"
id="encryption-status" oncommand="showMessageComposeSecurityStatus();"/>
</statusbar>
var signed_element = document.getElementById("signed");
var encrypted_element = document.getElementById("encrypted");
+ var signedReceiptRequest_element = document.getElementById("signedReceiptRequest");
+ var tripleWrapped_element = document.getElementById("tripleWrapped");
var securityLabel_element = document.getElementById("securityLabel");
if (params.smFields.requireEncryptMessage)
signed_element.value = no_string;
}
+ if (params.smFields.signedReceiptRequest)
+ {
+ if (params.isSigningCertAvailable)
+ signedReceiptRequest_element.value = yes_string;
+ else
+ signedReceiptRequest_element.value = not_possible_string;
+ }
+ else
+ signedReceiptRequest_element.value = no_string;
+
+ if (params.smFields.tripleWrapMessage)
+ {
+ if (params.isEncryptionCertAvailable && canEncrypt.value && params.isSigningCertAvailable)
+ {
+ tripleWrapped_element.value = yes_string;
+ }
+ else
+ {
+ tripleWrapped_element.value = not_possible_string;
+ }
+ }
+ else
+ {
+ tripleWrapped_element.value = no_string;
+ }
+
/* Security Label */
if (params.smFields.securityPolicyIdentifier != "")
{
else
securityLabel_element.value = no_string;
+ }
}
var imax = gCount.value;
var gSecureBundle = Components.classes["@mozilla.org/intl/stringbundle;1"].getService(Components.interfaces.nsIStringBundleService);
var secureBundle = gSecureBundle.createBundle(SECURE_HEADER_PROPERTIES_URL);
var sLabel;
- if(params.isSecureHeaderAvailable == "true"){
- // get international label for new line
- sLabel = secureBundle.GetStringFromName("yes.label");
- document.getElementById("headerSecured").setAttribute("value",sLabel);
- ReadSecureHeaders(params);
+ if(params.isSecureHeaderAvailable){
+ // get international label for new line
+ sLabel = secureBundle.GetStringFromName("yes.label");
+ document.getElementById("headerSecured").setAttribute("value",sLabel);
+ ReadSecureHeaders(params);
}
else{
- sLabel = secureBundle.GetStringFromName("no.label");
- document.getElementById("headerSecured").setAttribute("value",sLabel);
+ sLabel = secureBundle.GetStringFromName("no.label");
+ document.getElementById("headerSecured").setAttribute("value",sLabel);
}
}
<script type="application/javascript" src="chrome://help/content/contextHelp.js"/>
<script type="application/javascript" src="chrome://messenger-smime/content/msgCompSecurityInfo.js"/>
+ <script type="application/javascript" src="chrome://messenger-smime/content/msgSecurityLabel.js"/>
<stringbundle id="bundle_smime_comp_info" src="chrome://messenger-smime/locale/msgCompSecurityInfo.properties"/>
<columns>
<column/>
<column/>
+ <column/>
</columns>
<rows>
<row>
<label value="&status.signed;"/>
<label id="signed"/>
</row>
+ <row>
+ <label value="&status.securityLabel;"/>
+ <label id="securityLabel"/>
+ </row>
<row>
<label value="&status.encrypted;"/>
<label id="encrypted"/>
</row>
+ <row>
+ <label value="&secureHeaders.field;"/>
+ <label id="headerSecured"/>
+ </row>
</rows>
</grid>
content/messenger-smime/msgSecurityLabel.js (content/msgSecurityLabel.js)
content/messenger-smime/msgCompSecurityLabelDialog.xul (content/msgCompSecurityLabelDialog.xul)
content/messenger-smime/msgCompSecurityLabelDialog.js (content/msgCompSecurityLabelDialog.js)
+content/messenger-smime/msgCompSecurityLabelDialog.xul (content/msgCompSecurityLabelDialog.xul)
+content/messenger-smime/msgCompSecurityLabelDialog.js (content/msgCompSecurityLabelDialog.js)
#endif