mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-12 09:01:16 +00:00
bug 844351 - remove nsISSLErrorListener r=cykesiopka
--HG-- extra : amend_source : e2adec756356509f0a4601bbeabf7ba7c8d15a8e
This commit is contained in:
parent
9404a5bc8f
commit
5a690c59fa
@ -27,7 +27,6 @@ XPIDL_SOURCES += [
|
||||
'nsIPKCS11ModuleDB.idl',
|
||||
'nsIPKCS11Slot.idl',
|
||||
'nsIProtectedAuthThread.idl',
|
||||
'nsISSLErrorListener.idl',
|
||||
'nsISSLStatus.idl',
|
||||
'nsITokenDialogs.idl',
|
||||
'nsITokenPasswordDialogs.idl',
|
||||
|
@ -1,29 +0,0 @@
|
||||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* 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/. */
|
||||
|
||||
#include "nsISupports.idl"
|
||||
|
||||
interface nsIInterfaceRequestor;
|
||||
|
||||
/**
|
||||
* A mechanism to report a broken SSL connection. The recipient should NOT block.
|
||||
*/
|
||||
[scriptable, uuid(99f8d972-bae4-414c-b39b-47587d3ded68)]
|
||||
interface nsISSLErrorListener : nsISupports {
|
||||
|
||||
/**
|
||||
* @param socketInfo A network communication context that can be used to obtain more information
|
||||
* about the active connection.
|
||||
* @param error The code associated with the error.
|
||||
* @param targetSite The Site name that was used to open the current connection.
|
||||
*
|
||||
* @return The consumer shall return true if it wants to suppress the error message
|
||||
* related to the error (the connection will still get canceled).
|
||||
*/
|
||||
boolean notifySSLError(in nsIInterfaceRequestor socketInfo,
|
||||
in int32_t error,
|
||||
in AUTF8String targetSite);
|
||||
};
|
@ -20,7 +20,6 @@
|
||||
#include "nsIPrefService.h"
|
||||
#include "nsIClientAuthDialogs.h"
|
||||
#include "nsClientAuthRemember.h"
|
||||
#include "nsISSLErrorListener.h"
|
||||
|
||||
#include "nsNetUtil.h"
|
||||
#include "nsPrintfCString.h"
|
||||
@ -621,29 +620,6 @@ nsHandleSSLError(nsNSSSocketInfo* socketInfo,
|
||||
return;
|
||||
}
|
||||
|
||||
nsresult rv;
|
||||
NS_DEFINE_CID(nssComponentCID, NS_NSSCOMPONENT_CID);
|
||||
nsCOMPtr<nsINSSComponent> nssComponent(do_GetService(nssComponentCID, &rv));
|
||||
if (NS_FAILED(rv))
|
||||
return;
|
||||
|
||||
// Try to get a nsISSLErrorListener implementation from the socket consumer.
|
||||
nsCOMPtr<nsIInterfaceRequestor> cb;
|
||||
socketInfo->GetNotificationCallbacks(getter_AddRefs(cb));
|
||||
if (cb) {
|
||||
nsCOMPtr<nsISSLErrorListener> sel = do_GetInterface(cb);
|
||||
if (sel) {
|
||||
nsIInterfaceRequestor* csi = static_cast<nsIInterfaceRequestor*>(socketInfo);
|
||||
|
||||
nsCString hostWithPortString;
|
||||
getSiteKey(socketInfo->GetHostName(), socketInfo->GetPort(),
|
||||
hostWithPortString);
|
||||
|
||||
bool suppressMessage = false; // obsolete, ignored
|
||||
rv = sel->NotifySSLError(csi, err, hostWithPortString, &suppressMessage);
|
||||
}
|
||||
}
|
||||
|
||||
// We must cancel first, which sets the error code.
|
||||
socketInfo->SetCanceled(err, PlainErrorMessage);
|
||||
nsXPIDLString errorString;
|
||||
|
Loading…
Reference in New Issue
Block a user