tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

nsIClientAuthDialogService.idl (2160B)


      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/. */
      4 
      5 #include "nsISupports.idl"
      6 #include "nsIClientAuthRememberService.idl"
      7 
      8 interface nsILoadContext;
      9 interface nsIX509Cert;
     10 
     11 [scriptable, function, uuid(6b00d96d-fb8a-4c9f-9632-c9e1235befce)]
     12 interface nsIClientAuthDialogCallback : nsISupports
     13 {
     14  void certificateChosen(in nsIX509Cert cert, in nsIClientAuthRememberService_Duration rememberDuration);
     15 };
     16 
     17 /**
     18 * Provides UI when a server requests a TLS client authentication certificate.
     19 */
     20 [scriptable, uuid(fa4c7520-1433-11d5-ba24-00108303b117)]
     21 interface nsIClientAuthDialogService : nsISupports
     22 {
     23  /**
     24   * Called when a user is asked to choose a certificate for client auth.
     25   *
     26   * @param hostname Hostname of the server.
     27   * @param certArray Array of certificates the user can choose from.
     28   *                  Expected to be empty on Android.
     29   * @param loadContext The nsILoadContext of the connection requesting a
     30   *                    certificate. May be null, in which case the
     31   *                    implementation will use the most recent window to show
     32   *                    UI.
     33   * @param caNames Array of arrays of bytes representing X.500 Distinguished
     34   *                Names that the server specified as acceptable issuers for
     35   *                the client certificate. On non-Android platforms, certArray
     36   *                will have already been filtered by this list, and it can be
     37   *                ignored.
     38   * @param callback The nsIClientAuthDialogCallback to call when a certificate
     39   *                 has been chosen (or no certificate).
     40   */
     41  [must_use]
     42  void chooseCertificate(in AUTF8String hostname,
     43                         in Array<nsIX509Cert> certArray,
     44                         in nsILoadContext loadContext,
     45                         in Array<Array<octet> > caNames,
     46                         in nsIClientAuthDialogCallback callback);
     47 };
     48 
     49 %{C++
     50 #define NS_CLIENTAUTHDIALOGSERVICE_CONTRACTID "@mozilla.org/security/ClientAuthDialogService;1"
     51 %}