Bug 1935611 - Fix libyuv/libpng link failed for loongarch64. r=glandium,tnikkel,ng
[gecko.git] / security / manager / ssl / nsICertificateDialogs.idl
blob7df24d94e051db575ecddb38b3887e1e2c913371
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;
8 interface nsIX509Cert;
10 /**
11 * Functions that implement user interface dialogs to manage certificates.
13 [scriptable, uuid(da871dab-f69e-4173-ab26-99fcd47b0e85)]
14 interface nsICertificateDialogs : nsISupports
16 /**
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.
28 [must_use]
29 boolean confirmDownloadCACert(in nsIInterfaceRequestor ctx,
30 in nsIX509Cert cert,
31 out unsigned long trust);
33 /**
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
39 * password.
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.
46 [must_use]
47 boolean setPKCS12FilePassword(in nsIInterfaceRequestor ctx,
48 out AString password);
50 /**
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.
61 [must_use]
62 boolean getPKCS12FilePassword(in nsIInterfaceRequestor ctx,
63 out AString password);
66 %{C++
67 #define NS_CERTIFICATEDIALOGS_CONTRACTID "@mozilla.org/nsCertificateDialogs;1"