Fix bug 387398 - Missing (Client, Server) Certificate support. r=berend

git-svn-id: svn://10.0.0.236/trunk@252398 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mozilla%kewis.ch
2008-06-17 10:38:15 +00:00
parent e4881eaa4d
commit ab781a9434
6 changed files with 205 additions and 17 deletions

View File

@@ -22,6 +22,7 @@
* Contributor(s):
* Matthew Willis <lilmatt@mozilla.com>
* Jeff Walden <jwalden+code@mit.edu>
* Philipp Kewisch <mozilla@kewis.ch>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
@@ -78,7 +79,6 @@ var gAdvancedPane = {
"", null);
},
// PASSWORDS TAB
/**
@@ -218,13 +218,13 @@ var gAdvancedPane = {
* locked, disabled, and checked/unchecked states.
*
* UI state matrix for update preference conditions
*
*
* UI Elements: Preferences
* 1 = Sunbird checkbox i = app.update.enabled
* 2 = When updates for Sunbird are found label ii = app.update.auto
* 3 = Automatic Radiogroup (Ask vs. Auto) iii = app.update.mode
* 4 = Warn before disabling add-ons checkbox
*
*
* States:
* Element Disabled Pref Value Locked
* 1 false i t/f f
@@ -347,6 +347,58 @@ var gAdvancedPane = {
var prompter = Components.classes["@mozilla.org/updates/update-prompt;1"]
.createInstance(Components.interfaces.nsIUpdatePrompt);
prompter.showUpdateHistory(window);
}
},
// ENCRYPTION TAB
/*
* Preferences:
*
* security.enable_ssl3
* - true if SSL 3 encryption is enabled, false otherwise
* security.enable_tls
* - true if TLS encryption is enabled, false otherwise
* security.default_personal_cert
* - a string:
* "Select Automatically" select a certificate automatically when a site
* requests one
* "Ask Every Time" present a dialog to the user so he can select
* the certificate to use on a site which
* requests one
*/
/**
* Displays the user's certificates and associated options.
*/
showCertificates: function gAP_showCertificates() {
document.documentElement.openWindow("mozilla:certmanager",
"chrome://pippki/content/certManager.xul",
"", null);
},
/**
* Displays a dialog which describes the user's CRLs.
*/
showCRLs: function gAP_showCRLs() {
document.documentElement.openWindow("Mozilla:CRLManager",
"chrome://pippki/content/crlManager.xul",
"", null);
},
/**
* Displays a dialog in which OCSP preferences can be configured.
*/
showOCSP: function gAP_showOCSP() {
document.documentElement.openSubDialog("chrome://mozapps/content/preferences/ocsp.xul",
"", null);
},
/**
* Displays a dialog from which the user can manage his security devices.
*/
showSecurityDevices: function gAP_showSecurityDevices() {
document.documentElement.openWindow("mozilla:devicemanager",
"chrome://pippki/content/device_manager.xul",
"", null);
}
};

View File

@@ -23,6 +23,7 @@
- Matthew Willis <lilmatt@mozilla.com>
- Jeff Walden <jwalden+code@mit.edu>
- Stefan Sitter <ssitter@googlemail.com>
- Philipp Kewisch <mozilla@kewis.ch>
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
@@ -52,7 +53,7 @@
<script type="application/x-javascript"
src="chrome://calendar/content/preferences/advanced.js"/>
<preferences>
<preferences id="advancePrefs-preferences">
<preference id="calendar.preferences.advanced.selectedTabIndex"
name="calendar.preferences.advanced.selectedTabIndex"
type="int"/>
@@ -88,21 +89,36 @@
<preference id="app.update.disable_button.showUpdateHistory"
name="app.update.disable_button.showUpdateHistory"
type="bool"/>
<!-- Encryption tab -->
<preference id="security.enable_ssl3" name="security.enable_ssl3" type="bool"/>
<preference id="security.enable_tls" name="security.enable_tls" type="bool"/>
<preference id="security.default_personal_cert" name="security.default_personal_cert" type="string"/>
<preference id="security.disable_button.openCertManager"
name="security.disable_button.openCertManager"
type="bool"/>
<preference id="security.OCSP.disable_button.managecrl"
name="security.OCSP.disable_button.managecrl"
type="bool"/>
<preference id="security.disable_button.openDeviceManager"
name="security.disable_button.openDeviceManager"
type="bool"/>
</preferences>
<tabbox id="advancedPrefs"
flex="1"
onselect="gAdvancedPane.tabSelectionChanged();">
<tabs>
<tab label="&pref.calendar.advanced.generalTab.label;"/>
<tab label="&pref.calendar.advanced.passwordsTab.label;"/>
<tab label="&pref.calendar.advanced.updateTab.label;"/>
<tabs id="advancedPrefs-tabs">
<tab id="generalTab" label="&pref.calendar.advanced.generalTab.label;"/>
<tab id="networkTab" label="&pref.calendar.advanced.passwordsTab.label;"/>
<tab id="updateTab" label="&pref.calendar.advanced.updateTab.label;"/>
<tab id="encryptionTab" label="&pref.calendar.advanced.encryptionTab.label;"/>
</tabs>
<tabpanels flex="1">
<tabpanels id="advancedPrefs-tabpanels" flex="1">
<!-- General -->
<tabpanel orient="vertical">
<tabpanel id="generalPanel" orient="vertical">
<hbox align="center" pack="start">
<description flex="1">&pref.calendar.advanced.proxiesInfo.label;</description>
<button id="catProxiesButton"
@@ -125,7 +141,7 @@
</tabpanel>
<!-- Passwords -->
<tabpanel orient="vertical" align="start">
<tabpanel id="passwordsPanel" orient="vertical" align="start">
<description>&pref.calendar.advanced.savedPasswords.intro;</description>
<checkbox id="useMasterPassword"
label="&pref.calendar.advanced.useMasterPassword.label;"
@@ -134,7 +150,7 @@
class="indent"
flex="1"/>
<separator/>
<hbox align="start">
<description flex="1">&pref.calendar.advanced.masterPassword.intro;</description>
<vbox>
@@ -204,10 +220,98 @@
oncommand="gAdvancedPane.showUpdates();"/>
</hbox>
</tabpanel>
<!-- Encryption -->
<tabpanel id="encryptionPanel" orient="vertical">
<!-- Protocols -->
<groupbox id="protocolsGroup">
<caption label="&pref.calendar.advanced.encryption.protocols.label;"/>
<grid>
<columns>
<column flex="1"/>
<column flex="1"/>
</columns>
<rows>
<row>
<hbox>
<checkbox id="useSSL3"
label="&pref.calendar.advanced.encryption.useSSL3.label;"
accesskey="&pref.calendar.advanced.encryption.useSSL3.accesskey;"
preference="security.enable_ssl3"/>
</hbox>
<hbox>
<checkbox id="useTLS1"
label="&pref.calendar.advanced.encryption.useTLS1.label;"
accesskey="&pref.calendar.advanced.encryption.useTLS1.accesskey;"
preference="security.enable_tls"/>
</hbox>
</row>
</rows>
</grid>
</groupbox>
<!-- Certificates -->
<groupbox id="certificatesGroup">
<caption id="CertGroupCaption"
label="&pref.calendar.advanced.encryption.certificates.label;"/>
<description id="CertSelectionDesc" control="certSelection">&pref.calendar.advanced.encryption.certSelection.description;</description>
<!--
The values on these radio buttons may look like l12y issues, but
they're not - this preference uses *those strings* as its values.
I KID YOU NOT.
-->
<radiogroup id="certSelection" orient="horizontal" preftype="string"
preference="security.default_personal_cert"
aria-labelledby="CertGroupCaption CertSelectionDesc">
<radio label="&pref.calendar.advanced.encryption.certs.auto;"
accesskey="&pref.calendar.advanced.encryption.certs.auto.accesskey;"
value="Select Automatically"/>
<radio label="&pref.calendar.advanced.encryption.certs.ask;"
accesskey="&pref.calendar.advanced.encryption.certs.ask.accesskey;"
value="Ask Every Time"/>
</radiogroup>
<separator/>
#ifdef XP_MACOSX
<vbox>
#endif
<hbox>
<button id="viewCertificatesButton"
label="&pref.calendar.advanced.encryption.viewCerts.label;"
accesskey="&pref.calendar.advanced.encryption.viewCerts.accesskey;"
oncommand="gAdvancedPane.showCertificates();"
preference="security.disable_button.openCertManager"/>
<button id="viewCRLButton"
label="&pref.calendar.advanced.encryption.viewCRLs.label;"
accesskey="&pref.calendar.advanced.encryption.viewCRLs.accesskey;"
oncommand="gAdvancedPane.showCRLs();"
preference="security.OCSP.disable_button.managecrl"/>
<button id="verificationButton"
label="&pref.calendar.advanced.encryption.verify2.label;"
accesskey="&pref.calendar.advanced.encryption.verify2.accesskey;"
oncommand="gAdvancedPane.showOCSP();"/>
#ifdef XP_MACOSX
</hbox>
<hbox>
#endif
<button id="viewSecurityDevicesButton"
label="&pref.calendar.advanced.encryption.viewSecurityDevices.label;"
accesskey="&pref.calendar.advanced.encryption.viewSecurityDevices.accesskey;"
oncommand="gAdvancedPane.showSecurityDevices();"
preference="security.disable_button.openDeviceManager"/>
</hbox>
#ifdef XP_MACOSX
</vbox>
#endif
</groupbox>
</tabpanel>
</tabpanels>
</tabbox>
<separator/>
</vbox>
</overlay>

View File

@@ -23,6 +23,7 @@
# Contributor(s): Ben Goodger <ben@netscape.com> (Original Author)
# Kevin Gerich <webmail@kmgerich.com>
# Matthew Willis <mattwillis@gmail.com>
# Philipp Kewisch <mozilla@kewis.ch>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
@@ -204,3 +205,7 @@ tabpanels {
padding: 18px 10px 10px;
margin: 0 6px 6px;
}
tabpanels caption {
background-color: -moz-Dialog;
}

View File

@@ -23,6 +23,7 @@
# Contributor(s): Ben Goodger <ben@netscape.com> (Original Author)
# Kevin Gerich <webmail@kmgerich.com>
# Matthew Willis <mattwillis@gmail.com>
# Philipp Kewisch <mozilla@kewis.ch>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
@@ -123,3 +124,6 @@ filefield[disabled="true"] .fileFieldIcon {
margin: 0px;
}
tabpanels caption {
background-color: -moz-Dialog;
}

View File

@@ -20,6 +20,7 @@
-
- Contributor(s):
- Matthew Willis <lilmatt@mozilla.com>
- Philipp Kewisch <mozilla@kewis.ch>
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
@@ -43,6 +44,7 @@
<!ENTITY pref.calendar.advanced.generalTab.label "General">
<!ENTITY pref.calendar.advanced.passwordsTab.label "Passwords">
<!ENTITY pref.calendar.advanced.updateTab.label "Update">
<!ENTITY pref.calendar.advanced.encryptionTab.label "Encryption">
<!-- General -->
<!ENTITY pref.calendar.advanced.showConnections.label "Connection Settings…">
@@ -77,3 +79,24 @@
<!ENTITY pref.calendar.advanced.update.modeAutoWarn.accesskey "W">
<!ENTITY pref.calendar.advanced.update.showHistory.label "Show Update History…">
<!ENTITY pref.calendar.advanced.update.showHistory.accesskey "U">
<!-- Encryption -->
<!ENTITY pref.calendar.advanced.encryption.protocols.label "Protocols">
<!ENTITY pref.calendar.advanced.encryption.useSSL3.label "Use SSL 3.0">
<!ENTITY pref.calendar.advanced.encryption.useSSL3.accesskey "3">
<!ENTITY pref.calendar.advanced.encryption.useTLS1.label "Use TLS 1.0">
<!ENTITY pref.calendar.advanced.encryption.useTLS1.accesskey "1">
<!ENTITY pref.calendar.advanced.encryption.certificates.label "Certificates">
<!ENTITY pref.calendar.advanced.encryption.certSelection.description "When a server requests my personal certificate:">
<!ENTITY pref.calendar.advanced.encryption.certs.auto "Select one automatically">
<!ENTITY pref.calendar.advanced.encryption.certs.auto.accesskey "l">
<!ENTITY pref.calendar.advanced.encryption.certs.ask "Ask me every time">
<!ENTITY pref.calendar.advanced.encryption.certs.ask.accesskey "i">
<!ENTITY pref.calendar.advanced.encryption.viewCerts.label "View Certificates">
<!ENTITY pref.calendar.advanced.encryption.viewCerts.accesskey "s">
<!ENTITY pref.calendar.advanced.encryption.viewCRLs.label "Revocation Lists">
<!ENTITY pref.calendar.advanced.encryption.viewCRLs.accesskey "R">
<!ENTITY pref.calendar.advanced.encryption.verify2.label "Validation">
<!ENTITY pref.calendar.advanced.encryption.verify2.accesskey "V">
<!ENTITY pref.calendar.advanced.encryption.viewSecurityDevices.label "Security Devices">
<!ENTITY pref.calendar.advanced.encryption.viewSecurityDevices.accesskey "y">

View File

@@ -17,7 +17,7 @@ calendar.jar:
content/calendar/datetimepickers/datetimepickers.css (content/datetimepickers/datetimepickers.css)
* content/calendar/datetimepickers/datetimepickers.xml (content/datetimepickers/datetimepickers.xml)
content/calendar/preferences/advanced.js (/calendar/base/content/preferences/advanced.js)
content/calendar/preferences/advanced.xul (/calendar/base/content/preferences/advanced.xul)
* content/calendar/preferences/advanced.xul (/calendar/base/content/preferences/advanced.xul)
* content/calendar/preferences/connection.xul (/calendar/base/content/preferences/connection.xul)
* content/calendar/preferences/connection.js (/calendar/base/content/preferences/connection.js)
* content/calendar/preferences/preferences.xul (/calendar/base/content/preferences/preferences.xul)