|
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 |
|
7 interface nsIInterfaceRequestor; |
|
8 interface nsIX509Cert; |
|
9 interface nsISSLStatus; |
|
10 |
|
11 [scriptable, uuid(0729ce8e-8935-4989-ba72-a2d6307f2365)] |
|
12 interface nsISSLCertErrorDialog : nsISupports |
|
13 { |
|
14 /** |
|
15 * Called when an SSL connection aborts because of a bad certificate, |
|
16 * and no other code is in place for reporting the problem. |
|
17 * Should bring up a dialog to inform the user and display the certificate. |
|
18 * |
|
19 * @param status Might be used to query additional information |
|
20 * @param cert The certificate that this error is about |
|
21 * @param textErrorMessage An error message with whitespace formatting |
|
22 * @param htmlErrorMessage Optional, might either be empty, |
|
23 or might contain the same message as in |
|
24 textErrorMessage plus some html formatting. |
|
25 * @param hostName The error occurred when connecting to this hostName. |
|
26 * @param portNumber The error occurred when connecting to this portNumber. |
|
27 */ |
|
28 void showCertError(in nsIInterfaceRequestor ctx, |
|
29 in nsISSLStatus status, |
|
30 in nsIX509Cert cert, |
|
31 in AString textErrorMessage, |
|
32 in AString htmlErrorMessage, |
|
33 in ACString hostName, |
|
34 in uint32_t portNumber); |
|
35 }; |
|
36 |
|
37 %{C++ |
|
38 #define NS_SSLCERTERRORDIALOG_CONTRACTID "@mozilla.org/nsSSLCertErrorDialog;1" |
|
39 %} |