michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: interface nsIInterfaceRequestor; michael@0: interface nsIX509Cert; michael@0: interface nsISSLStatus; michael@0: michael@0: [scriptable, uuid(0729ce8e-8935-4989-ba72-a2d6307f2365)] michael@0: interface nsISSLCertErrorDialog : nsISupports michael@0: { michael@0: /** michael@0: * Called when an SSL connection aborts because of a bad certificate, michael@0: * and no other code is in place for reporting the problem. michael@0: * Should bring up a dialog to inform the user and display the certificate. michael@0: * michael@0: * @param status Might be used to query additional information michael@0: * @param cert The certificate that this error is about michael@0: * @param textErrorMessage An error message with whitespace formatting michael@0: * @param htmlErrorMessage Optional, might either be empty, michael@0: or might contain the same message as in michael@0: textErrorMessage plus some html formatting. michael@0: * @param hostName The error occurred when connecting to this hostName. michael@0: * @param portNumber The error occurred when connecting to this portNumber. michael@0: */ michael@0: void showCertError(in nsIInterfaceRequestor ctx, michael@0: in nsISSLStatus status, michael@0: in nsIX509Cert cert, michael@0: in AString textErrorMessage, michael@0: in AString htmlErrorMessage, michael@0: in ACString hostName, michael@0: in uint32_t portNumber); michael@0: }; michael@0: michael@0: %{C++ michael@0: #define NS_SSLCERTERRORDIALOG_CONTRACTID "@mozilla.org/nsSSLCertErrorDialog;1" michael@0: %}