bug 450257 - Move SeaMonkey-specific files in manager/ to comm-central/suite, r=kaie sr=Neil
authorRobert Kaiser <kairo@kairo.at>
Wed, 03 Sep 2008 19:33:17 +0200
changeset 253 e8fdf415c5710e10b4c0c11aab206f06a6c707da
parent 252 7cd9b3d26cef3b8a2fd3d42db133ab4956036fb0
child 254 26e570823110f86fabe302a10a2e48df292b9ac3
push idunknown
push userunknown
push dateunknown
reviewerskaie, Neil
bugs450257
bug 450257 - Move SeaMonkey-specific files in manager/ to comm-central/suite, r=kaie sr=Neil
suite/Makefile.in
suite/common/jar.mn
suite/common/pref/preferences.xul
suite/locales/en-US/chrome/common/pref/PrefsOverlay.dtd
suite/locales/en-US/chrome/common/pref/pref-certs.dtd
suite/locales/en-US/chrome/common/pref/pref-masterpass.dtd
suite/locales/en-US/chrome/common/pref/pref-ssl.dtd
suite/locales/en-US/chrome/common/pref/pref-validation.dtd
suite/locales/en-US/chrome/common/pref/preftree.dtd
suite/locales/jar.mn
suite/security/Makefile.in
suite/security/jar.mn
suite/security/prefs/PrefOverlay.xul
suite/security/prefs/pref-certs.js
suite/security/prefs/pref-certs.xul
suite/security/prefs/pref-masterpass.js
suite/security/prefs/pref-masterpass.xul
suite/security/prefs/pref-ssl.xul
suite/security/prefs/pref-validation.js
suite/security/prefs/pref-validation.xul
--- a/suite/Makefile.in
+++ b/suite/Makefile.in
@@ -51,16 +51,17 @@ DIRS += debugQA
 DIRS		+= \
 		branding \
 		browser \
 		common \
 		locales \
 		modules \
 		themes \
 		profile \
+		security \
 		shell \
 		build \
 		app \
 		$(NULL)
 
 ifeq ($(OS_ARCH),WINNT)
 ifdef MOZ_INSTALLER
 DIRS += installer/windows
--- a/suite/common/jar.mn
+++ b/suite/common/jar.mn
@@ -1,17 +1,16 @@
 comm.jar:
 % content communicator %content/communicator/ xpcnativewrappers=yes
 % override chrome://global/content/license.html chrome://communicator/content/license.html
 % override chrome://mozapps/content/profile/profileSelection.xul chrome://communicator/content/profile/profileSelection.xul
 % overlay chrome://communicator/content/contentAreaContextOverlay.xul chrome://communicator/content/permissions/imageContextOverlay.xul
 % overlay chrome://navigator/content/navigatorOverlay.xul chrome://communicator/content/permissions/permissionsNavigatorOverlay.xul
 % overlay chrome://global/content/console.xul chrome://communicator/content/consoleOverlay.xul
 % overlay chrome://help/content/help.xul chrome://communicator/content/helpOverlay.xul
-% overlay chrome://communicator/content/pref/preftree.xul chrome://pippki/content/PrefOverlay.xul
 % overlay chrome://editor/content/EdAdvancedEdit.xul chrome://communicator/content/helpEditorOverlay.xul
 % overlay chrome://editor/content/EdImageProps.xul chrome://communicator/content/helpEditorOverlay.xul
 % overlay chrome://editor/content/EditorPublish.xul chrome://communicator/content/helpEditorOverlay.xul
 % overlay chrome://editor/content/EditorPublishProgress.xul chrome://communicator/content/helpEditorOverlay.xul
 % overlay chrome://editor/content/EditorPublishSettings.xul chrome://communicator/content/helpEditorOverlay.xul
 % overlay chrome://editor/content/EdLinkProps.xul chrome://communicator/content/helpEditorOverlay.xul
 % overlay chrome://editor/content/EdTableProps.xul chrome://communicator/content/helpEditorOverlay.xul
 % overlay chrome://pippki/content/certManager.xul chrome://communicator/content/helpSecurityOverlay.xul
--- a/suite/common/pref/preferences.xul
+++ b/suite/common/pref/preferences.xul
@@ -161,16 +161,36 @@
                     url="chrome://communicator/content/pref/pref-cookies.xul"/>
           <treeitem id="imagesItem" label="&images.label;"
                     prefpane="images_pane" helpTopic="images_prefs"
                     url="chrome://communicator/content/pref/pref-images.xul"/>
 <!--
           <treeitem id="popupspref"
                     label="&popups.label;"
                     url="chrome://communicator/content/pref/pref-popups.xul"/>
+          <treeitem id="masterpassItem"
+                    label="&masterpass.label;"
+                    prefpane="masterpass_pane"
+                    url="chrome://pippki/content/pref-masterpass.xul"
+                    helpTopic="passwords_master"/>
+          <treeitem id="sslItem"
+                    label="&ssl.label;"
+                    prefpane="ssl_pane"
+                    url="chrome://pippki/content/pref-ssl.xul"
+                    helpTopic="ssl_prefs"/>
+          <treeitem id="certItem"
+                    label="&certs.label;"
+                    prefpane="certs_pane"
+                    url="chrome://pippki/content/pref-certs.xul"
+                    helpTopic="certs_prefs"/>
+          <treeitem id="validationItem"
+                    label="&validation.label;"
+                    prefpane="validation_pane"
+                    url="chrome://pippki/content/pref-validation.xul"
+                    helpTopic="validation_prefs"/>
 -->
         </treechildren>
       </treeitem>
 
       <!-- Advanced items -->
       <treeitem container="true"
                 id="advancedItem"
                 label="&advance.label;"
new file mode 100644
--- /dev/null
+++ b/suite/locales/en-US/chrome/common/pref/PrefsOverlay.dtd
@@ -0,0 +1,43 @@
+<!-- ***** BEGIN LICENSE BLOCK *****
+   - Version: MPL 1.1/GPL 2.0/LGPL 2.1
+   -
+   - The contents of this file are subject to the Mozilla Public License Version
+   - 1.1 (the "License"); you may not use this file except in compliance with
+   - the License. You may obtain a copy of the License at
+   - http://www.mozilla.org/MPL/
+   -
+   - Software distributed under the License is distributed on an "AS IS" basis,
+   - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+   - for the specific language governing rights and limitations under the
+   - License.
+   -
+   - The Original Code is mozilla.org code.
+   -
+   - The Initial Developer of the Original Code is
+   - Netscape Communications Corp.
+   - Portions created by the Initial Developer are Copyright (C) 2001
+   - the Initial Developer. All Rights Reserved.
+   -
+   - Contributor(s):
+   -   Bob Lord <lord@netscape.com>
+   -   Terry Hayes <thayes@netscape.com>
+   -
+   - 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
+   - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+   - in which case the provisions of the GPL or the LGPL are applicable instead
+   - of those above. If you wish to allow use of your version of this file only
+   - under the terms of either the GPL or the LGPL, and not to allow others to
+   - use your version of this file under the terms of the MPL, indicate your
+   - decision by deleting the provisions above and replace them with the notice
+   - and other provisions required by the GPL or the LGPL. If you do not delete
+   - the provisions above, a recipient may use your version of this file under
+   - the terms of any one of the MPL, the GPL or the LGPL.
+   -
+   - ***** END LICENSE BLOCK ***** -->
+
+<!ENTITY  masterpass.label             "Master Passwords">
+<!ENTITY  security.label               "Privacy and Security">
+<!ENTITY  ssl.label                    "SSL">
+<!ENTITY  certs.label                  "Certificates">
+<!ENTITY  validation.label             "Validation">
new file mode 100755
--- /dev/null
+++ b/suite/locales/en-US/chrome/common/pref/pref-certs.dtd
@@ -0,0 +1,53 @@
+<!-- ***** BEGIN LICENSE BLOCK *****
+   - Version: MPL 1.1/GPL 2.0/LGPL 2.1
+   -
+   - The contents of this file are subject to the Mozilla Public License Version
+   - 1.1 (the "License"); you may not use this file except in compliance with
+   - the License. You may obtain a copy of the License at
+   - http://www.mozilla.org/MPL/
+   -
+   - Software distributed under the License is distributed on an "AS IS" basis,
+   - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+   - for the specific language governing rights and limitations under the
+   - License.
+   -
+   - The Original Code is mozilla.org code.
+   -
+   - The Initial Developer of the Original Code is
+   - Netscape Communications Corp.
+   - Portions created by the Initial Developer are Copyright (C) 2001
+   - the Initial Developer. All Rights Reserved.
+   -
+   - Contributor(s):
+   -   Bob Lord <lord@netscape.com>
+   -   Terry Hayes <thayes@netscape.com>
+   -
+   - 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
+   - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+   - in which case the provisions of the GPL or the LGPL are applicable instead
+   - of those above. If you wish to allow use of your version of this file only
+   - under the terms of either the GPL or the LGPL, and not to allow others to
+   - use your version of this file under the terms of the MPL, indicate your
+   - decision by deleting the provisions above and replace them with the notice
+   - and other provisions required by the GPL or the LGPL. If you do not delete
+   - the provisions above, a recipient may use your version of this file under
+   - the terms of any one of the MPL, the GPL or the LGPL.
+   -
+   - ***** END LICENSE BLOCK ***** -->
+
+<!ENTITY  resetsettings.label      "Reset Settings">
+<!ENTITY  resetpreferences.label   "Reset Preferences…">
+<!ENTITY  managecerts.caption      "Manage Certificates">
+<!ENTITY  managecerts.text         "Use the Certificate Manager to manage your personal certificates, as well as those of other people and certificate authorities.">
+<!ENTITY  managecerts.button       "Manage Certificates…">
+<!ENTITY  managecerts.accesskey    "M">
+<!ENTITY  managedevices.caption    "Manage Security Devices">
+<!ENTITY  managedevices.text       "Use this button to manage your security devices, such as smart cards.">
+<!ENTITY  managedevices.button     "Manage Security Devices…">
+<!ENTITY  managedevices.accesskey  "S">
+
+<!ENTITY  ssl.label                "SSL">
+
+<!ENTITY  pref.certs.title         "Certificates">
+<!ENTITY  certs.label              "Certificates">
new file mode 100755
--- /dev/null
+++ b/suite/locales/en-US/chrome/common/pref/pref-masterpass.dtd
@@ -0,0 +1,58 @@
+<!-- ***** BEGIN LICENSE BLOCK *****
+   - Version: MPL 1.1/GPL 2.0/LGPL 2.1
+   -
+   - The contents of this file are subject to the Mozilla Public License Version
+   - 1.1 (the "License"); you may not use this file except in compliance with
+   - the License. You may obtain a copy of the License at
+   - http://www.mozilla.org/MPL/
+   -
+   - Software distributed under the License is distributed on an "AS IS" basis,
+   - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+   - for the specific language governing rights and limitations under the
+   - License.
+   -
+   - The Original Code is mozilla.org code.
+   -
+   - The Initial Developer of the Original Code is
+   - Netscape Communications Corp.
+   - Portions created by the Initial Developer are Copyright (C) 2001
+   - the Initial Developer. All Rights Reserved.
+   -
+   - Contributor(s):
+   -   Bob Lord <lord@netscape.com>
+   -   Terry Hayes <thayes@netscape.com>
+   -
+   - 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
+   - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+   - in which case the provisions of the GPL or the LGPL are applicable instead
+   - of those above. If you wish to allow use of your version of this file only
+   - under the terms of either the GPL or the LGPL, and not to allow others to
+   - use your version of this file under the terms of the MPL, indicate your
+   - decision by deleting the provisions above and replace them with the notice
+   - and other provisions required by the GPL or the LGPL. If you do not delete
+   - the provisions above, a recipient may use your version of this file under
+   - the terms of any one of the MPL, the GPL or the LGPL.
+   -
+   - ***** END LICENSE BLOCK ***** -->
+
+<!ENTITY  pref.masterpass.title                  "Master Passwords">
+<!ENTITY  managepassword.caption                 "Master Password Timeout">
+<!ENTITY  managepassword.text                    "&brandShortName; will ask for your master password:">
+<!ENTITY  managepassword.askfirsttime            "The first time it is needed">
+<!ENTITY  managepassword.askfirsttime.accesskey  "T">
+<!ENTITY  managepassword.askeverytime            "Every time it is needed">
+<!ENTITY  managepassword.askeverytime.accesskey  "E">
+<!ENTITY  managepassword.asktimeout              "If it has not been used for ">
+<!ENTITY  managepassword.asktimeout.accesskey    "n">
+<!ENTITY  managepassword.timeout.unit            "minutes or longer">
+
+<!ENTITY  changepassword.caption                 "Change Master Password">
+<!ENTITY  changepassword.text                    "Your master password protects sensitive information such as web passwords and certificates.">
+<!ENTITY  changepassword.button                  "Change Password…">
+<!ENTITY  changepassword.accesskey               "C">
+
+<!ENTITY  resetpassword.caption                  "Reset Master Password">
+<!ENTITY  resetpassword.text                     "If you reset your master password, all of your stored web and e-mail passwords, form data, personal certificates, and private keys will be lost.">
+<!ENTITY  resetpassword.button                   "Reset Password">
+<!ENTITY  resetpassword.accesskey                "R">
new file mode 100755
--- /dev/null
+++ b/suite/locales/en-US/chrome/common/pref/pref-ssl.dtd
@@ -0,0 +1,67 @@
+<!-- ***** BEGIN LICENSE BLOCK *****
+   - Version: MPL 1.1/GPL 2.0/LGPL 2.1
+   -
+   - The contents of this file are subject to the Mozilla Public License Version
+   - 1.1 (the "License"); you may not use this file except in compliance with
+   - the License. You may obtain a copy of the License at
+   - http://www.mozilla.org/MPL/
+   -
+   - Software distributed under the License is distributed on an "AS IS" basis,
+   - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+   - for the specific language governing rights and limitations under the
+   - License.
+   -
+   - The Original Code is mozilla.org code.
+   -
+   - The Initial Developer of the Original Code is
+   - Netscape Communications Corp.
+   - Portions created by the Initial Developer are Copyright (C) 2001
+   - the Initial Developer. All Rights Reserved.
+   -
+   - Contributor(s):
+   -   Bob Lord <lord@netscape.com>
+   -   Terry Hayes <thayes@netscape.com>
+   -
+   - 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
+   - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+   - in which case the provisions of the GPL or the LGPL are applicable instead
+   - of those above. If you wish to allow use of your version of this file only
+   - under the terms of either the GPL or the LGPL, and not to allow others to
+   - use your version of this file under the terms of the MPL, indicate your
+   - decision by deleting the provisions above and replace them with the notice
+   - and other provisions required by the GPL or the LGPL. If you do not delete
+   - the provisions above, a recipient may use your version of this file under
+   - the terms of any one of the MPL, the GPL or the LGPL.
+   -
+   - ***** END LICENSE BLOCK ***** -->
+
+<!ENTITY  SSLProtocolVersions.caption       "SSL Protocol Versions">
+<!ENTITY  SSLWarnings.caption               "SSL Warnings">
+<!ENTITY  SSLClientAuthMethod.caption       "Client Certificate Selection">
+
+<!ENTITY pref.ssl.title                     "Secure Sockets Layer (SSL)">
+<!ENTITY enable.ssl3                        "Enable SSL version 3">
+<!ENTITY enable.ssl3.accesskey              "3">
+<!ENTITY enable.tls                         "Enable TLS">
+<!ENTITY enable.tls.accesskey               "T">
+
+<!ENTITY warn.description                   "&brandShortName; can alert you to the security status of the web page you are viewing. Set &brandShortName; to show a warning and ask permission before:">
+<!ENTITY warn.enteringsecure                "Loading a page that supports encryption">
+<!ENTITY warn.enteringsecure.accesskey      "L">
+<!ENTITY warn.enteringweak                  "Loading a page that uses low-grade encryption">
+<!ENTITY warn.enteringweak.accesskey        "o">
+<!ENTITY warn.insecurepost                  "Sending form data from an unencrypted page to an unencrypted page">
+<!ENTITY warn.insecurepost.accesskey        "S">
+<!ENTITY warn.leavingsecure                 "Leaving a page that supports encryption">
+<!ENTITY warn.leavingsecure.accesskey       "a">
+<!ENTITY warn.secureredirect                "Redirecting from one encrypted page to another">
+<!ENTITY warn.secureredirecttoinsecure      "Redirecting from an encrypted page to an unencrypted page">
+<!ENTITY warn.viewmixed                     "Viewing a page with an encrypted/unencrypted mix">
+<!ENTITY warn.viewmixed.accesskey           "V">
+
+<!ENTITY certselect.description             "Decide how &brandShortName; selects a security certificate to present to web sites that require one:">
+<!ENTITY certselect.auto                    "Select Automatically">
+<!ENTITY certselect.auto.accesskey          "A">
+<!ENTITY certselect.ask                     "Ask Every Time">
+<!ENTITY certselect.ask.accesskey           "E">
new file mode 100755
--- /dev/null
+++ b/suite/locales/en-US/chrome/common/pref/pref-validation.dtd
@@ -0,0 +1,57 @@
+<!-- ***** BEGIN LICENSE BLOCK *****
+   - Version: MPL 1.1/GPL 2.0/LGPL 2.1
+   -
+   - The contents of this file are subject to the Mozilla Public License Version
+   - 1.1 (the "License"); you may not use this file except in compliance with
+   - the License. You may obtain a copy of the License at
+   - http://www.mozilla.org/MPL/
+   -
+   - Software distributed under the License is distributed on an "AS IS" basis,
+   - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+   - for the specific language governing rights and limitations under the
+   - License.
+   -
+   - The Original Code is mozilla.org code.
+   -
+   - The Initial Developer of the Original Code is
+   - Netscape Communications Corp.
+   - Portions created by the Initial Developer are Copyright (C) 2001
+   - the Initial Developer. All Rights Reserved.
+   -
+   - Contributor(s):
+   -   David P. Drinan (ddrinan@netscape.com)
+   -
+   - 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
+   - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+   - in which case the provisions of the GPL or the LGPL are applicable instead
+   - of those above. If you wish to allow use of your version of this file only
+   - under the terms of either the GPL or the LGPL, and not to allow others to
+   - use your version of this file under the terms of the MPL, indicate your
+   - decision by deleting the provisions above and replace them with the notice
+   - and other provisions required by the GPL or the LGPL. If you do not delete
+   - the provisions above, a recipient may use your version of this file under
+   - the terms of any one of the MPL, the GPL or the LGPL.
+   -
+   - ***** END LICENSE BLOCK ***** -->
+
+<!ENTITY  pref.validation.title                   "Validation">
+
+<!ENTITY  validation.crl.caption                  "CRL">
+<!ENTITY  validation.crl.description              "Use the CRL Manager to manage the Certificate Revocation Lists (CRL) that are stored in your certificate database.">
+<!ENTITY  validation.managecrls.button            "Manage CRLs…">
+<!ENTITY  validation.managecrls.accesskey         "M">
+
+<!ENTITY validation.ocsp.caption                  "OCSP">
+<!ENTITY enableOCSP.label                         "Use the Online Certificate Status Protocol (OCSP) to confirm the current validity of certificates">
+<!ENTITY enableOCSP.accesskey                     "U">
+<!ENTITY certOCSP2.label                          "Validate a certificate if it specifies an OCSP server">
+<!ENTITY certOCSP2.accesskey                      "V">
+<!ENTITY proxyOCSP2.label                         "Validate all certificates using the following OCSP server:">
+<!ENTITY proxyOCSP2.accesskey                     "a">
+<!ENTITY serviceURL.label                         "Service URL:">
+<!ENTITY serviceURL.accesskey                     "S">
+<!ENTITY signingCA.label                          "Response Signer:">
+<!ENTITY signingCA.accesskey                      "R">
+<!ENTITY validation.requireOCSP.description       "When an OCSP server connection fails, treat the certificate as invalid">
+<!ENTITY validation.requireOCSP.accesskey         "W">
--- a/suite/locales/en-US/chrome/common/pref/preftree.dtd
+++ b/suite/locales/en-US/chrome/common/pref/preftree.dtd
@@ -15,16 +15,21 @@
 <!ENTITY compose.label "Composer">
 <!ENTITY editing.label "New Page Settings">
 <!ENTITY publish.label "Publish">
 <!ENTITY offline.label "Offline">
 <!ENTITY security.label "Privacy &amp; Security">
 <!ENTITY cookies.label "Cookies">
 <!ENTITY images.label "Images">
 <!ENTITY popups.label "Popup Windows">
+<!ENTITY masterpass.label "Master Passwords">
+<!ENTITY security.label "Privacy and Security">
+<!ENTITY ssl.label "SSL">
+<!ENTITY certs.label "Certificates">
+<!ENTITY validation.label "Validation">
 <!ENTITY advance.label "Advanced">
 <!ENTITY down.label "Download">
 <!ENTITY cache.label "Cache">
 <!ENTITY proxies.label "Proxies">
 <!ENTITY httpnetworking.label "HTTP Networking">
 <!ENTITY smart.label "Software Installation">
 <!ENTITY download.label "Downloads">
 <!ENTITY keynav.label "Keyboard Navigation">
--- a/suite/locales/jar.mn
+++ b/suite/locales/jar.mn
@@ -329,8 +329,13 @@
   locale/@AB_CD@/navigator/viewSource.properties                            (%chrome/browser/viewSource.properties)
   locale/@AB_CD@/navigator-platform/mac/navigator.properties                (%chrome/browser/mac/navigator.properties)
   locale/@AB_CD@/navigator-platform/mac/platformNavigationBindings.dtd      (%chrome/browser/mac/platformNavigationBindings.dtd)
   locale/@AB_CD@/navigator-platform/unix/navigator.properties               (%chrome/browser/unix/navigator.properties)
   locale/@AB_CD@/navigator-platform/unix/platformNavigationBindings.dtd     (%chrome/browser/unix/platformNavigationBindings.dtd)
   locale/@AB_CD@/navigator-platform/win/navigator.properties                (%chrome/browser/win/navigator.properties)
   locale/@AB_CD@/navigator-platform/win/platformNavigationBindings.dtd      (%chrome/browser/win/platformNavigationBindings.dtd)
   locale/@AB_CD@/navigator-region/region.properties                         (%chrome/browser/region.properties)
+  locale/@AB_CD@/pippki/pref-certs.dtd                                      (%chrome/common/pref/pref-certs.dtd)
+  locale/@AB_CD@/pippki/pref-masterpass.dtd                                 (%chrome/common/pref/pref-masterpass.dtd)
+  locale/@AB_CD@/pippki/pref-ssl.dtd                                        (%chrome/common/pref/pref-ssl.dtd)
+  locale/@AB_CD@/pippki/pref-validation.dtd                                 (%chrome/common/pref/pref-validation.dtd)
+  locale/@AB_CD@/pippki/PrefsOverlay.dtd                                    (%chrome/common/pref/PrefsOverlay.dtd)
new file mode 100644
--- /dev/null
+++ b/suite/security/Makefile.in
@@ -0,0 +1,44 @@
+#
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is mozilla.org code.
+#
+# The Initial Developer of the Original Code is
+# the mozilla.org SeaMonkey project.
+# Portions created by the Initial Developer are Copyright (C) 2008
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#   Robert Kaiser <kairo@kairo.at>
+#
+# 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
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+DEPTH=../..
+topsrcdir=@top_srcdir@
+srcdir=@srcdir@
+VPATH=@srcdir@
+
+include $(topsrcdir)/config/rules.mk
new file mode 100644
--- /dev/null
+++ b/suite/security/jar.mn
@@ -0,0 +1,10 @@
+pippki.jar:
+% overlay chrome://communicator/content/pref/preftree.xul chrome://pippki/content/PrefOverlay.xul
+   content/pippki/PrefOverlay.xul           (prefs/PrefOverlay.xul)
+   content/pippki/pref-certs.js             (prefs/pref-certs.js)
+   content/pippki/pref-certs.xul            (prefs/pref-certs.xul)
+   content/pippki/pref-masterpass.js        (prefs/pref-masterpass.js)
+   content/pippki/pref-masterpass.xul       (prefs/pref-masterpass.xul)
+   content/pippki/pref-ssl.xul              (prefs/pref-ssl.xul)
+   content/pippki/pref-validation.js        (prefs/pref-validation.js)
+   content/pippki/pref-validation.xul       (prefs/pref-validation.xul)
new file mode 100644
--- /dev/null
+++ b/suite/security/prefs/PrefOverlay.xul
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<!-- ***** BEGIN LICENSE BLOCK *****
+   - Version: MPL 1.1/GPL 2.0/LGPL 2.1
+   -
+   - The contents of this file are subject to the Mozilla Public License Version
+   - 1.1 (the "License"); you may not use this file except in compliance with
+   - the License. You may obtain a copy of the License at
+   - http://www.mozilla.org/MPL/
+   -
+   - Software distributed under the License is distributed on an "AS IS" basis,
+   - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+   - for the specific language governing rights and limitations under the
+   - License.
+   -
+   - The Original Code is mozilla.org code.
+   -
+   - The Initial Developer of the Original Code is
+   - Netscape Communications Corp.
+   - Portions created by the Initial Developer are Copyright (C) 2001
+   - the Initial Developer. All Rights Reserved.
+   -
+   - Contributor(s):
+   -   Terry Hayes <thayes@netscape.com>
+   -
+   - 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
+   - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+   - in which case the provisions of the GPL or the LGPL are applicable instead
+   - of those above. If you wish to allow use of your version of this file only
+   - under the terms of either the GPL or the LGPL, and not to allow others to
+   - use your version of this file under the terms of the MPL, indicate your
+   - decision by deleting the provisions above and replace them with the notice
+   - and other provisions required by the GPL or the LGPL. If you do not delete
+   - the provisions above, a recipient may use your version of this file under
+   - the terms of any one of the MPL, the GPL or the LGPL.
+   -
+   - ***** END LICENSE BLOCK ***** -->
+
+<!DOCTYPE overlay SYSTEM "chrome://pippki/locale/PrefsOverlay.dtd">
+
+<overlay id="pipPrefOverlayID"
+         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+
+  <treechildren id="securityChildren">
+    <treeitem id="masterpassItem">
+      <treerow>
+        <treecell url="chrome://pippki/content/pref-masterpass.xul"
+                      label="&masterpass.label;"/>
+      </treerow>
+    </treeitem>
+    <treeitem id="sslItem">
+      <treerow>
+        <treecell url="chrome://pippki/content/pref-ssl.xul"
+                      label="&ssl.label;"/>
+      </treerow>
+    </treeitem>
+    <treeitem id="certItem">
+      <treerow>
+        <treecell url="chrome://pippki/content/pref-certs.xul"
+                      label="&certs.label;"/>
+      </treerow>
+    </treeitem>
+    <treeitem id="validationItem">
+      <treerow>
+        <treecell url="chrome://pippki/content/pref-validation.xul"
+                      label="&validation.label;"/>
+      </treerow>
+    </treeitem>
+  </treechildren>
+</overlay>
new file mode 100644
--- /dev/null
+++ b/suite/security/prefs/pref-certs.js
@@ -0,0 +1,68 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Javier Delgadillo <javi@netscape.com>
+ *
+ * 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
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+function openCertManager()
+{
+    //check for an existing certManager window and focus it; it's not application modal
+    const kWindowMediatorContractID = "@mozilla.org/appshell/window-mediator;1";
+    const kWindowMediatorIID = Components.interfaces.nsIWindowMediator;
+    const kWindowMediator = Components.classes[kWindowMediatorContractID].getService(kWindowMediatorIID);
+    var lastCertManager = kWindowMediator.getMostRecentWindow("mozilla:certmanager");
+    if (lastCertManager)
+      lastCertManager.focus();
+    else {
+      window.open('chrome://pippki/content/certManager.xul',  "",
+                  'chrome,centerscreen,resizable,dialog');
+    }
+}
+
+function openDeviceManager()
+{
+    //check for an existing deviceManger window and focus it; it's not application modal
+    const kWindowMediatorContractID = "@mozilla.org/appshell/window-mediator;1";
+    const kWindowMediatorIID = Components.interfaces.nsIWindowMediator;
+    const kWindowMediator = Components.classes[kWindowMediatorContractID].getService(kWindowMediatorIID);
+    var lastCertManager = kWindowMediator.getMostRecentWindow("mozilla:devicemanager");
+    if (lastCertManager)
+      lastCertManager.focus();
+    else {
+      window.open('chrome://pippki/content/device_manager.xul',  "devmgr",
+                  'chrome,centerscreen,resizable,dialog');
+    }
+}
new file mode 100644
--- /dev/null
+++ b/suite/security/prefs/pref-certs.xul
@@ -0,0 +1,100 @@
+<?xml version="1.0"?> 
+<!-- ***** BEGIN LICENSE BLOCK *****
+   - Version: MPL 1.1/GPL 2.0/LGPL 2.1
+   -
+   - The contents of this file are subject to the Mozilla Public License Version
+   - 1.1 (the "License"); you may not use this file except in compliance with
+   - the License. You may obtain a copy of the License at
+   - http://www.mozilla.org/MPL/
+   -
+   - Software distributed under the License is distributed on an "AS IS" basis,
+   - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+   - for the specific language governing rights and limitations under the
+   - License.
+   -
+   - The Original Code is mozilla.org code.
+   -
+   - The Initial Developer of the Original Code is
+   - Netscape Communications Corp.
+   - Portions created by the Initial Developer are Copyright (C) 2001
+   - the Initial Developer. All Rights Reserved.
+   -
+   - Contributor(s):
+   -   Bob Lord <lord@netscape.com>
+   -   Terry Hayes <thayes@netscape.com>
+   -
+   - 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
+   - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+   - in which case the provisions of the GPL or the LGPL are applicable instead
+   - of those above. If you wish to allow use of your version of this file only
+   - under the terms of either the GPL or the LGPL, and not to allow others to
+   - use your version of this file under the terms of the MPL, indicate your
+   - decision by deleting the provisions above and replace them with the notice
+   - and other provisions required by the GPL or the LGPL. If you do not delete
+   - the provisions above, a recipient may use your version of this file under
+   - the terms of any one of the MPL, the GPL or the LGPL.
+   -
+   - ***** END LICENSE BLOCK ***** -->
+
+<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
+
+<!DOCTYPE page [
+  <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
+  <!ENTITY % prefCertsDTD SYSTEM "chrome://pippki/locale/pref-certs.dtd">
+  <!ENTITY % prefSslDTD SYSTEM "chrome://pippki/locale/pref-ssl.dtd">
+  %brandDTD;
+  %prefCertsDTD;
+  %prefSslDTD;
+]>
+
+<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+      onload="parent.initPanel('chrome://pippki/content/pref-certs.xul');"
+      headertitle="&pref.certs.title;">
+
+  <!-- List elements to manage for prefs -->
+  <script type="application/x-javascript" src="chrome://pippki/content/pref-certs.js"/>
+  <script type="application/x-javascript">
+  <![CDATA[
+    var _elementIDs = [ "certSelection" ];
+  ]]>
+  </script>
+
+  <groupbox align="start">
+    <caption label="&SSLClientAuthMethod.caption;"/>
+    <description> &certselect.description; </description>
+    <!-- Prefs -->
+    <radiogroup id="certSelection" orient="horizontal" preftype="string" 
+	        prefstring="security.default_personal_cert">
+    <radio label="&certselect.auto;" accesskey="&certselect.auto.accesskey;" value="Select Automatically"/>
+    <radio label="&certselect.ask;" accesskey="&certselect.ask.accesskey;" value="Ask Every Time"/>
+    </radiogroup>
+  </groupbox>
+
+  <!-- Certificate manager -->
+  <groupbox>
+    <caption label="&managecerts.caption;"/>
+    <description>&managecerts.text;</description>
+    <hbox align="center">
+      <button label="&managecerts.button;"
+              oncommand="openCertManager();" 
+              id="openCertManagerButton"
+              accesskey="&managecerts.accesskey;"
+              prefstring="security.disable_button.openCertManager"/>
+    </hbox>
+  </groupbox>
+
+  <!-- Device manager -->
+  <groupbox>
+    <caption label="&managedevices.caption;"/>
+    <description>&managedevices.text;</description>
+    <hbox align="center">
+      <button label="&managedevices.button;"
+              oncommand="openDeviceManager();"
+              id="openDeviceManagerButton"
+              accesskey="&managedevices.accesskey;"
+              prefstring="security.disable_button.openDeviceManager"/>
+    </hbox>
+  </groupbox>
+
+</page>
new file mode 100644
--- /dev/null
+++ b/suite/security/prefs/pref-masterpass.js
@@ -0,0 +1,121 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ *
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Javier Delgadillo <javi@netscape.com>
+ *
+ * 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
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+const nsIPK11Token = Components.interfaces.nsIPK11Token;
+const nsPK11TokenDB = "@mozilla.org/security/pk11tokendb;1";
+const nsIPK11TokenDB = Components.interfaces.nsIPK11TokenDB;
+const nsIDialogParamBlock = Components.interfaces.nsIDialogParamBlock;
+const nsDialogParamBlock = "@mozilla.org/embedcomp/dialogparam;1";
+
+var internal_token;
+
+function onMasterPasswordLoad()
+{
+  var tokendb = Components.classes[nsPK11TokenDB].getService(nsIPK11TokenDB);
+  internal_token = tokendb.getInternalKeyToken();
+  var askTimes = internal_token.getAskPasswordTimes();
+  switch (askTimes) {
+  case nsIPK11Token.ASK_FIRST_TIME:  askTimes = 0; break;
+  case nsIPK11Token.ASK_EVERY_TIME:  askTimes = 1; break;
+  case nsIPK11Token.ASK_EXPIRE_TIME: askTimes = 2; break;
+  }
+  var radiogroup = document.getElementById("passwordAskTimes");
+  var radioitem;
+  switch (askTimes) {
+  case 0: radioitem = document.getElementById("askFirstTime"); break;
+  case 1: radioitem = document.getElementById("askEveryTime"); break;
+  case 2: radioitem = document.getElementById("askTimeout"); break;
+  }
+  radiogroup.selectedItem = radioitem;
+  var timeout = internal_token.getAskPasswordTimeout();
+  var timeoutField = document.getElementById("passwordTimeout");
+  timeoutField.setAttribute("value", timeout);
+  
+  changePasswordSettings(false);
+}
+
+function changePasswordSettings(setFocus)
+{
+  var askTimes = 0;
+  var timeout = internal_token.getAskPasswordTimeout();
+  var timeoutField = document.getElementById("passwordTimeout");
+  var radiogroup = document.getElementById("passwordAskTimes");
+  switch ( radiogroup.value ) {
+  case "0": 
+    timeoutField.setAttribute("disabled", true);
+    askTimes = nsIPK11Token.ASK_FIRST_TIME;
+    break;
+  case "1": 
+    timeoutField.setAttribute("disabled", true);
+    askTimes = nsIPK11Token.ASK_EVERY_TIME;
+    break;
+  case "2":
+    timeoutField.removeAttribute("disabled");
+    if ( setFocus ) {
+      timeoutField.focus();
+    }
+    timeout = timeoutField.value;
+    var re = new RegExp("^[0-9]+$");
+    if (!re.test(timeout)) {
+      timeout = "1";
+    }
+    askTimes = nsIPK11Token.ASK_EXPIRE_TIME;
+    break;
+  }
+  internal_token.setAskPasswordDefaults(askTimes, timeout);
+
+  var askEveryTimeHidden = document.getElementById("askEveryTimeHidden");
+  askEveryTimeHidden.checked = (radiogroup.value == 1) ? true : false;
+}
+
+function ChangePW()
+{
+  var params = Components.classes[nsDialogParamBlock].createInstance(nsIDialogParamBlock);
+  params.SetString(1,"");
+  window.openDialog("chrome://pippki/content/changepassword.xul","",
+                    "chrome,centerscreen,modal",params);
+}
+
+function ResetPW()
+{
+  var params = Components.classes[nsDialogParamBlock].createInstance(nsIDialogParamBlock);
+  params.SetString(1,internal_token.tokenName);
+  window.openDialog("chrome://pippki/content/resetpassword.xul", "",
+                    "chrome,centerscreen,modal", params);
+}
new file mode 100644
--- /dev/null
+++ b/suite/security/prefs/pref-masterpass.xul
@@ -0,0 +1,126 @@
+<?xml version="1.0"?> 
+<!-- ***** BEGIN LICENSE BLOCK *****
+   - Version: MPL 1.1/GPL 2.0/LGPL 2.1
+   -
+   - The contents of this file are subject to the Mozilla Public License Version
+   - 1.1 (the "License"); you may not use this file except in compliance with
+   - the License. You may obtain a copy of the License at
+   - http://www.mozilla.org/MPL/
+   -
+   - Software distributed under the License is distributed on an "AS IS" basis,
+   - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+   - for the specific language governing rights and limitations under the
+   - License.
+   -
+   - The Original Code is mozilla.org code.
+   -
+   - The Initial Developer of the Original Code is
+   - Netscape Communications Corp.
+   - Portions created by the Initial Developer are Copyright (C) 2001
+   - the Initial Developer. All Rights Reserved.
+   -
+   - Contributor(s):
+   -   Ian McGreer <mcgreer@netscape.com>
+   -
+   - 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
+   - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+   - in which case the provisions of the GPL or the LGPL are applicable instead
+   - of those above. If you wish to allow use of your version of this file only
+   - under the terms of either the GPL or the LGPL, and not to allow others to
+   - use your version of this file under the terms of the MPL, indicate your
+   - decision by deleting the provisions above and replace them with the notice
+   - and other provisions required by the GPL or the LGPL. If you do not delete
+   - the provisions above, a recipient may use your version of this file under
+   - the terms of any one of the MPL, the GPL or the LGPL.
+   -
+   - ***** END LICENSE BLOCK ***** -->
+
+<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
+
+<!DOCTYPE page [
+  <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
+  <!ENTITY % prefPass SYSTEM "chrome://pippki/locale/pref-masterpass.dtd">
+  %brandDTD;
+  %prefPass;
+]>
+
+<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+      onload="parent.initPanel('chrome://pippki/content/pref-masterpass.xul'); onMasterPasswordLoad();"
+      headertitle="&pref.masterpass.title;">
+
+  <script type="application/x-javascript" src="chrome://pippki/content/pref-masterpass.js"/>
+
+  <!-- List elements to manage for prefs -->
+  <script type="application/x-javascript">
+  <![CDATA[
+    var _elementIDs = ["askEveryTimeHidden",
+                       "changePasswordButton",
+                       "resetPasswordButton",
+                       "passwordAskTimes",
+                       "passwordTimeout"];
+  ]]>
+  </script>
+            
+  <!-- Change Password -->
+  <groupbox>
+    <caption label="&changepassword.caption;"/>
+    <description>&changepassword.text;</description>
+    <hbox align="center">
+      <button label="&changepassword.button;"
+              oncommand="ChangePW();"
+              id="changePasswordButton"
+              accesskey="&changepassword.accesskey;"
+              prefstring="security.disable_button.changePassword"/>
+    </hbox>
+  </groupbox>
+
+  <!-- Password Prefs -->
+  <groupbox>
+
+    <checkbox id="askEveryTimeHidden"
+              prefstring="signon.expireMasterPassword"
+              hidden="true"/>
+
+    <caption label="&managepassword.caption;"/>
+    <description>&managepassword.text;</description>
+    <hbox align="center">
+      <radiogroup id="passwordAskTimes"
+                  prefstring="security.ask_for_password"
+                  flex="1">
+        <!-- note that these values are different than what NSS uses, which
+             are (0, -1, 1) respectively -->
+        <radio value="0" label="&managepassword.askfirsttime;" id="askFirstTime"
+               accesskey="&managepassword.askfirsttime.accesskey;"
+               style="margin: 0px;" oncommand="changePasswordSettings(false);"/>
+        <radio value="1" label="&managepassword.askeverytime;" id="askEveryTime"
+               accesskey="&managepassword.askeverytime.accesskey;"
+               style="margin: 0px;" oncommand="changePasswordSettings(false);"/>
+        <hbox align="center">
+          <radio value="2" label="&managepassword.asktimeout;" id="askTimeout"
+                 accesskey="&managepassword.asktimeout.accesskey;"
+                 style="margin: 0px;" oncommand="changePasswordSettings(true);"/>
+          <textbox id="passwordTimeout" size="4"
+                   preftype="int"
+                   prefstring="security.password_lifetime"
+                   oninput="changePasswordSettings(false);"/>
+          <label value="&managepassword.timeout.unit;" style="margin: 4px;"/>
+        </hbox>
+      </radiogroup>
+    </hbox>
+  </groupbox>
+
+  <!-- Reset Password -->
+  <groupbox>
+    <caption label="&resetpassword.caption;"/>
+    <description>&resetpassword.text;</description>
+    <hbox align="center">
+      <button label="&resetpassword.button;"
+              oncommand="ResetPW();"
+              id="resetPasswordButton"
+              accesskey="&resetpassword.accesskey;"
+              prefstring="security.disable_button.resetPassword"/>
+    </hbox>
+  </groupbox>
+
+</page>
new file mode 100644
--- /dev/null
+++ b/suite/security/prefs/pref-ssl.xul
@@ -0,0 +1,100 @@
+<?xml version="1.0"?> 
+<!-- ***** BEGIN LICENSE BLOCK *****
+   - Version: MPL 1.1/GPL 2.0/LGPL 2.1
+   -
+   - The contents of this file are subject to the Mozilla Public License Version
+   - 1.1 (the "License"); you may not use this file except in compliance with
+   - the License. You may obtain a copy of the License at
+   - http://www.mozilla.org/MPL/
+   -
+   - Software distributed under the License is distributed on an "AS IS" basis,
+   - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+   - for the specific language governing rights and limitations under the
+   - License.
+   -
+   - The Original Code is mozilla.org code.
+   -
+   - The Initial Developer of the Original Code is
+   - Netscape Communications Corp.
+   - Portions created by the Initial Developer are Copyright (C) 2001
+   - the Initial Developer. All Rights Reserved.
+   -
+   - Contributor(s):
+   -   Bob Lord <lord@netscape.com>
+   -   Terry Hayes <thayes@netscape.com>
+   -
+   - 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
+   - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+   - in which case the provisions of the GPL or the LGPL are applicable instead
+   - of those above. If you wish to allow use of your version of this file only
+   - under the terms of either the GPL or the LGPL, and not to allow others to
+   - use your version of this file under the terms of the MPL, indicate your
+   - decision by deleting the provisions above and replace them with the notice
+   - and other provisions required by the GPL or the LGPL. If you do not delete
+   - the provisions above, a recipient may use your version of this file under
+   - the terms of any one of the MPL, the GPL or the LGPL.
+   -
+   - ***** END LICENSE BLOCK ***** -->
+
+<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
+
+<!DOCTYPE page [
+  <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
+  <!ENTITY % prefSslDTD SYSTEM "chrome://pippki/locale/pref-ssl.dtd">
+  %brandDTD;
+  %prefSslDTD;
+]>
+
+<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+      onload="parent.initPanel('chrome://pippki/content/pref-ssl.xul');"
+      headertitle="&pref.ssl.title;">
+
+  <!-- List elements to manage for prefs -->
+  <script type="application/x-javascript">
+  <![CDATA[
+    var _elementIDs = ["enableSSL3", "enableTLS", 
+        "warnEnteringSecure", "warnEnteringWeak", 
+        "warnLeavingSecure", "warnInsecurePost",
+        "warnViewMixed" ];
+  ]]>
+  </script>
+            
+  <groupbox orient="horizontal">
+    <caption label="&SSLProtocolVersions.caption;"/>
+
+    <!-- Prefs -->
+    <vbox flex="1" align="start">
+      <checkbox id="enableSSL3" label="&enable.ssl3;"
+                accesskey="&enable.ssl3.accesskey;"
+                prefstring="security.enable_ssl3"/>
+      <checkbox id="enableTLS" label="&enable.tls;"
+                accesskey="&enable.tls.accesskey;"
+                prefstring="security.enable_tls"/>
+    </vbox>
+
+  </groupbox>
+
+  <groupbox align="start">
+    <caption label="&SSLWarnings.caption;"/>
+    <description>&warn.description;</description>
+    <!-- Prefs -->
+    <checkbox id="warnEnteringSecure" label="&warn.enteringsecure;"
+              accesskey="&warn.enteringsecure.accesskey;"
+              prefstring="security.warn_entering_secure"/>
+    <checkbox id="warnEnteringWeak" label="&warn.enteringweak;"
+              accesskey="&warn.enteringweak.accesskey;"
+              prefstring="security.warn_entering_weak"/>
+    <checkbox id="warnLeavingSecure" label="&warn.leavingsecure;"
+              accesskey="&warn.leavingsecure.accesskey;"
+              prefstring="security.warn_leaving_secure"/>
+    <checkbox id="warnInsecurePost" label="&warn.insecurepost;"
+              accesskey="&warn.insecurepost.accesskey;"
+              prefstring="security.warn_submit_insecure"/>
+    <checkbox id="warnViewMixed" label="&warn.viewmixed;"
+              accesskey="&warn.viewmixed.accesskey;"
+              prefstring="security.warn_viewing_mixed"
+              checked="true"/>
+  </groupbox>
+
+</page>
new file mode 100644
--- /dev/null
+++ b/suite/security/prefs/pref-validation.js
@@ -0,0 +1,129 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2001
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   David Drinan <ddrinan@netscape.com>
+ *
+ * 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
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+const nsIX509CertDB = Components.interfaces.nsIX509CertDB;
+const nsX509CertDB = "@mozilla.org/security/x509certdb;1";
+const nsIOCSPResponder = Components.interfaces.nsIOCSPResponder;
+const nsISupportsArray = Components.interfaces.nsISupportsArray;
+
+var certdb;
+var ocspResponders;
+var cacheRadio = 0;
+
+function onLoad()
+{
+  var ocspEntry;
+  var i;
+
+  certdb = Components.classes[nsX509CertDB].getService(nsIX509CertDB);
+  ocspResponders = certdb.getOCSPResponders();
+
+  var signersMenu = document.getElementById("signingCA");
+  var signersURL = document.getElementById("serviceURL");
+  for (i=0; i<ocspResponders.length; i++) {
+    ocspEntry = ocspResponders.queryElementAt(i, nsIOCSPResponder);
+    var menuItemNode = document.createElement("menuitem");
+    menuItemNode.setAttribute("value", ocspEntry.responseSigner);
+    menuItemNode.setAttribute("label", ocspEntry.responseSigner);
+    signersMenu.firstChild.appendChild(menuItemNode);
+  }
+
+  parent.initPanel('chrome://pippki/content/pref-validation.xul');
+
+  doEnabling(0);
+}
+
+function doEnabling(called_by)
+{
+  var signingCA = document.getElementById("signingCA");
+  var serviceURL = document.getElementById("serviceURL");
+  var securityOCSPEnabled = document.getElementById("securityOCSPEnabled");
+  var requireWorkingOCSP = document.getElementById("requireWorkingOCSP");
+  var enableOCSPBox = document.getElementById("enableOCSPBox");
+  var certOCSP = document.getElementById("certOCSP");
+  var proxyOCSP = document.getElementById("proxyOCSP");
+
+  var OCSPPrefValue = parseInt(securityOCSPEnabled.value);
+
+  if (called_by == 0) {
+    // the radio button changed, or we init the stored value from prefs
+    enableOCSPBox.checked = (OCSPPrefValue != 0);
+  }
+  else {
+    // the user toggled the checkbox to enable/disable OCSP
+    var new_val = 0;
+    if (enableOCSPBox.checked) {
+      // now enabled. if we have a cached radio val, restore it.
+      // if not, use the first setting
+      new_val = (cacheRadio > 0) ? cacheRadio : 1;
+    }
+    else {
+      // now disabled. remember current value
+      cacheRadio = OCSPPrefValue;
+    }
+    securityOCSPEnabled.value = OCSPPrefValue = new_val;
+  }
+
+  certOCSP.disabled = (OCSPPrefValue == 0);
+  proxyOCSP.disabled = (OCSPPrefValue == 0);
+  signingCA.disabled = serviceURL.disabled = OCSPPrefValue == 0 || OCSPPrefValue == 1;
+  requireWorkingOCSP.disabled = (OCSPPrefValue == 0);
+}
+
+function changeURL()
+{
+  var signersMenu = document.getElementById("signingCA");
+  var signersURL = document.getElementById("serviceURL");
+  var CA = signersMenu.getAttribute("value");
+  var i;
+  var ocspEntry;
+
+  for (i=0; i < ocspResponders.length; i++) {
+    ocspEntry = ocspResponders.queryElementAt(i, nsIOCSPResponder);
+    if (CA == ocspEntry.responseSigner) {
+      signersURL.setAttribute("value", ocspEntry.serviceURL);
+      break;
+    }
+  }
+}
+
+function openCrlManager()
+{
+    window.open('chrome://pippki/content/crlManager.xul',  "",
+                'chrome,centerscreen,resizable');
+}
+
new file mode 100644
--- /dev/null
+++ b/suite/security/prefs/pref-validation.xul
@@ -0,0 +1,116 @@
+<?xml version="1.0"?> 
+<!-- ***** BEGIN LICENSE BLOCK *****
+   - Version: MPL 1.1/GPL 2.0/LGPL 2.1
+   -
+   - The contents of this file are subject to the Mozilla Public License Version
+   - 1.1 (the "License"); you may not use this file except in compliance with
+   - the License. You may obtain a copy of the License at
+   - http://www.mozilla.org/MPL/
+   -
+   - Software distributed under the License is distributed on an "AS IS" basis,
+   - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+   - for the specific language governing rights and limitations under the
+   - License.
+   -
+   - The Original Code is mozilla.org code.
+   -
+   - The Initial Developer of the Original Code is
+   - Netscape Communications Corp.
+   - Portions created by the Initial Developer are Copyright (C) 2001
+   - the Initial Developer. All Rights Reserved.
+   -
+   - Contributor(s):
+   -   David Drinan <ddrinan@netscape.com>
+   -
+   - 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
+   - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+   - in which case the provisions of the GPL or the LGPL are applicable instead
+   - of those above. If you wish to allow use of your version of this file only
+   - under the terms of either the GPL or the LGPL, and not to allow others to
+   - use your version of this file under the terms of the MPL, indicate your
+   - decision by deleting the provisions above and replace them with the notice
+   - and other provisions required by the GPL or the LGPL. If you do not delete
+   - the provisions above, a recipient may use your version of this file under
+   - the terms of any one of the MPL, the GPL or the LGPL.
+   -
+   - ***** END LICENSE BLOCK ***** -->
+
+<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
+
+<!DOCTYPE page [
+  <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
+  <!ENTITY % prefValidationDTD SYSTEM "chrome://pippki/locale/pref-validation.dtd">
+  %brandDTD;
+  %prefValidationDTD;
+]>
+
+<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+      onload="onLoad();"
+      headertitle="&pref.validation.title;">
+
+  <!-- List elements to manage for prefs -->
+  <script type="application/x-javascript">
+  <![CDATA[
+    var _elementIDs = ["securityOCSPEnabled", "serviceURL", "signingCA", "requireWorkingOCSP"];
+  ]]>
+  </script>
+            
+  <script type="application/x-javascript" src="chrome://pippki/content/pref-validation.js"/>
+
+  <groupbox>
+    <caption label="&validation.crl.caption;"/>
+    <description>&validation.crl.description;</description>
+    <hbox align="center">
+      <button label="&validation.managecrls.button;"
+              oncommand="openCrlManager();"
+              id="managecrlbutton"
+              accesskey="&validation.managecrls.accesskey;"
+              prefstring="security.OCSP.disable_button.managecrl"/>
+    </hbox>
+  </groupbox>
+
+  <groupbox align="start">
+    <caption label="&validation.ocsp.caption;"/>
+    <checkbox id="enableOCSPBox" label="&enableOCSP.label;"
+              accesskey="&enableOCSP.accesskey;" oncommand="doEnabling(1);"/>
+    <!-- Prefs -->
+    <radiogroup id="securityOCSPEnabled"
+                prefstring="security.OCSP.enabled">
+        <radio value="0" hidden="true"/>
+        <radio id="certOCSP" value="1" label="&certOCSP2.label;"
+               accesskey="&certOCSP2.accesskey;" oncommand="doEnabling(0);"/>
+        <radio id="proxyOCSP" value="2" label="&proxyOCSP2.label;"
+               accesskey="&proxyOCSP2.accesskey;" oncommand="doEnabling(0);"/>
+
+        <grid class="indent" flex="1">
+          <columns>
+          <column/>
+          <column flex="1"/>
+          </columns>
+          
+          <rows>
+            <row align="center">
+              <label value="&signingCA.label;"
+                     accesskey="&signingCA.accesskey;" control="signingCA"/>
+              <menulist id="signingCA" preftype="string" prefstring="security.OCSP.signingCA"
+                        flex="1" oncommand="changeURL()">
+                <menupopup/>
+              </menulist>
+            </row>
+            <row align="center">
+              <label value="&serviceURL.label;"
+                     accesskey="&serviceURL.accesskey;" control="serviceURL"/>
+              <textbox id="serviceURL" prefstring="security.OCSP.URL"/>
+            </row>
+         </rows>
+       </grid>
+    </radiogroup>
+    <separator class="thin"/>
+    <checkbox id="requireWorkingOCSP" label="&validation.requireOCSP.description;"
+                accesskey="&validation.requireOCSP.accesskey;"
+                prefstring="security.OCSP.require"/>
+
+  </groupbox>
+
+</page>