2012-05-31 13:33:35 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2002-09-17 22:51:22 +04:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
2016-06-24 10:12:16 +03:00
|
|
|
interface nsIArray;
|
2002-09-17 22:51:22 +04:00
|
|
|
interface nsIInterfaceRequestor;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Provides UI for SSL client-auth dialogs.
|
|
|
|
*/
|
|
|
|
[scriptable, uuid(fa4c7520-1433-11d5-ba24-00108303b117)]
|
|
|
|
interface nsIClientAuthDialogs : nsISupports
|
|
|
|
{
|
|
|
|
/**
|
2016-06-24 10:12:11 +03:00
|
|
|
* Called when a user is asked to choose a certificate for client auth.
|
|
|
|
*
|
|
|
|
* @param ctx Context that allows at least nsIClientAuthUserDecision to be
|
|
|
|
* queried.
|
2016-07-26 15:16:58 +03:00
|
|
|
* @param hostname Hostname of the server.
|
|
|
|
* @param port Port of the server.
|
2016-06-24 10:12:11 +03:00
|
|
|
* @param organization Organization field of the server cert.
|
|
|
|
* @param issuerOrg Organization field of the issuer cert of the server cert.
|
2016-06-24 10:12:16 +03:00
|
|
|
* @param certList List of certificates the user can choose from.
|
|
|
|
* @param selectedIndex Index of the cert in |certList| that the user chose.
|
|
|
|
* Ignored if the return value is false.
|
2016-06-24 10:12:11 +03:00
|
|
|
* @return true if a certificate was chosen. false if the user canceled.
|
2002-09-17 22:51:22 +04:00
|
|
|
*/
|
2017-05-25 16:56:04 +03:00
|
|
|
[must_use]
|
2016-06-24 10:12:11 +03:00
|
|
|
boolean chooseCertificate(in nsIInterfaceRequestor ctx,
|
2016-07-26 15:16:58 +03:00
|
|
|
in AUTF8String hostname,
|
|
|
|
in long port,
|
|
|
|
in AUTF8String organization,
|
|
|
|
in AUTF8String issuerOrg,
|
2016-06-24 10:12:16 +03:00
|
|
|
in nsIArray certList,
|
2016-06-24 10:12:11 +03:00
|
|
|
out unsigned long selectedIndex);
|
2002-09-17 22:51:22 +04:00
|
|
|
};
|
|
|
|
|
2009-05-21 02:21:51 +04:00
|
|
|
[scriptable, uuid(95c4373e-bdd4-4a63-b431-f5b000367721)]
|
|
|
|
interface nsIClientAuthUserDecision : nsISupports
|
|
|
|
{
|
|
|
|
attribute boolean rememberClientAuthCertificate;
|
|
|
|
};
|
|
|
|
|
2002-09-17 22:51:22 +04:00
|
|
|
%{C++
|
|
|
|
#define NS_CLIENTAUTHDIALOGS_CONTRACTID "@mozilla.org/nsClientAuthDialogs;1"
|
|
|
|
%}
|