whitespace
[conkeror.git] / modules / ssl.js
blobe2a96bb29615e8f0c154c8c1315d74c4d9ce8cdf
1 /**
2  * (C) Copyright 2008 Jeremy Maitin-Shepard
3  *
4  * Use, modification, and distribution are subject to the terms specified in the
5  * COPYING file.
6 **/
8 in_module(null);
10 function ssl_add_exception(buffer) {
11     /* FIXME: A user preference variable should specify whether to
12      * pre-fill location and furthermore (dependent on pre-filling the
13      * location) whether prefetchCert should be set to true. */
14     var params = { exceptionAdded: false };
15     if (buffer instanceof content_buffer) {
16         params.prefetchCert = true;
17         params.location = buffer.current_uri.spec;
18     }
19     buffer.window.openDialog("chrome://pippki/content/exceptionDialog.xul",
20                              "", "chrome,centerscreen,modal", params);
21     if ((buffer instanceof content_buffer) && params.exceptionAdded)
22         reload(buffer);
25 interactive("ssl-add-exception",
26             "Add an exception for the SSL certificate of the current content page.",
27             function (I) {ssl_add_exception(I.buffer);});
29 function ssl_certificate_manager() {
30     make_chrome_window("chrome://pippki/content/certManager.xul", null);
33 interactive("ssl-certificate-manager",
34             "Show the SSL certificate manager.\n" +
35             "The certificate manager can be used to view, import, and export certificates" +
36             " for Certificate Authorities (CA) as well as web sites.",
37             ssl_certificate_manager);
39 provide("ssl");