1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #include
"nsISupports.idl"
7 interface nsIInterfaceRequestor
;
11 * Functions that implement user interface dialogs to manage certificates.
13 [scriptable
, uuid(da871dab
-f69e
-4173
-ab26
-99fcd47b0e85
)]
14 interface nsICertificateDialogs
: nsISupports
17 * UI shown when a user is asked to download a new CA cert.
18 * Provides user with ability to choose trust settings for the cert.
19 * Asks the user to grant permission to import the certificate.
21 * @param ctx A user interface context.
22 * @param cert The certificate that is about to get installed.
23 * @param trust A bit mask of trust flags.
24 * See nsIX509CertDB for possible values.
26 * @return true if the user allows to import the certificate.
29 boolean confirmDownloadCACert
(in nsIInterfaceRequestor ctx
,
31 out unsigned long trust
);
34 * UI shown when a user's personal certificate is going to be
35 * exported to a backup file.
36 * The implementation of this dialog should make sure to prompt the user to
37 * type the password twice in order to confirm correct input.
38 * The wording in the dialog should also motivate the user to enter a strong
41 * @param ctx A user interface context.
42 * @param password The password provided by the user.
44 * @return false if the user requests to cancel.
47 boolean setPKCS12FilePassword
(in nsIInterfaceRequestor ctx
,
48 out AString password
);
51 * UI shown when a user is about to restore a personal
52 * certificate from a backup file.
53 * The user is requested to enter the password
54 * that was used in the past to protect that backup file.
56 * @param ctx A user interface context.
57 * @param password The password provided by the user.
59 * @return false if the user requests to cancel.
62 boolean getPKCS12FilePassword
(in nsIInterfaceRequestor ctx
,
63 out AString password
);
67 #define NS_CERTIFICATEDIALOGS_CONTRACTID
"@mozilla.org/nsCertificateDialogs;1"