nsIClientAuthDialogs.idl 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. #include "nsISupports.idl"
  5. interface nsIArray;
  6. interface nsIInterfaceRequestor;
  7. /**
  8. * Provides UI for SSL client-auth dialogs.
  9. */
  10. [scriptable, uuid(fa4c7520-1433-11d5-ba24-00108303b117)]
  11. interface nsIClientAuthDialogs : nsISupports
  12. {
  13. /**
  14. * Called when a user is asked to choose a certificate for client auth.
  15. *
  16. * @param ctx Context that allows at least nsIClientAuthUserDecision to be
  17. * queried.
  18. * @param hostname Hostname of the server.
  19. * @param port Port of the server.
  20. * @param organization Organization field of the server cert.
  21. * @param issuerOrg Organization field of the issuer cert of the server cert.
  22. * @param certList List of certificates the user can choose from.
  23. * @param selectedIndex Index of the cert in |certList| that the user chose.
  24. * Ignored if the return value is false.
  25. * @return true if a certificate was chosen. false if the user canceled.
  26. */
  27. boolean chooseCertificate(in nsIInterfaceRequestor ctx,
  28. in AUTF8String hostname,
  29. in long port,
  30. in AUTF8String organization,
  31. in AUTF8String issuerOrg,
  32. in nsIArray certList,
  33. out unsigned long selectedIndex);
  34. };
  35. [scriptable, uuid(95c4373e-bdd4-4a63-b431-f5b000367721)]
  36. interface nsIClientAuthUserDecision : nsISupports
  37. {
  38. attribute boolean rememberClientAuthCertificate;
  39. };
  40. %{C++
  41. #define NS_CLIENTAUTHDIALOGS_CONTRACTID "@mozilla.org/nsClientAuthDialogs;1"
  42. %}