File: ssl.js

package info (click to toggle)
conkeror 1.0.3%2Bgit170123-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 1,988 kB
  • sloc: ansic: 280; sh: 255; xml: 173; makefile: 69
file content (37 lines) | stat: -rw-r--r-- 1,417 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/**
 * (C) Copyright 2008 Jeremy Maitin-Shepard
 *
 * Use, modification, and distribution are subject to the terms specified in the
 * COPYING file.
**/

function ssl_add_exception(buffer) {
    /* FIXME: A user preference variable should specify whether to
     * pre-fill location and furthermore (dependent on pre-filling the
     * location) whether prefetchCert should be set to true. */
    var params = { exceptionAdded: false };
    if (buffer instanceof content_buffer) {
        params.prefetchCert = true;
        params.location = buffer.current_uri.spec;
    }
    buffer.window.openDialog("chrome://pippki/content/exceptionDialog.xul",
                             "", "chrome,centerscreen,modal", params);
    if ((buffer instanceof content_buffer) && params.exceptionAdded)
        reload(buffer);
}

interactive("ssl-add-exception",
            "Add an exception for the SSL certificate of the current content page.",
            function (I) {ssl_add_exception(I.buffer);});

function ssl_certificate_manager() {
    make_chrome_window("chrome://pippki/content/certManager.xul", null);
}

interactive("ssl-certificate-manager",
            "Show the SSL certificate manager.\n" +
            "The certificate manager can be used to view, import, and export certificates" +
            " for Certificate Authorities (CA) as well as web sites.",
            ssl_certificate_manager);

provide("ssl");