Bug 1143105 - remove unnecessary nsISSLErrorListener implementations in comm-central. r=jcranmer,clokep
This commit is contained in:
Родитель
7be0e2d320
Коммит
c90c70bdee
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
* This implements nsIServerSocketListener, nsIStreamListener,
|
||||
* nsIRequestObserver, nsITransportEventSink, nsIBadCertListener2,
|
||||
* nsISSLErrorListener, and nsIProtocolProxyCallback.
|
||||
* and nsIProtocolProxyCallback.
|
||||
*
|
||||
* This uses nsISocketTransportServices, nsIServerSocket, nsIThreadManager,
|
||||
* nsIBinaryInputStream, nsIScriptableInputStream, nsIInputStreamPump,
|
||||
|
@ -526,14 +526,6 @@ const Socket = {
|
|||
return true;
|
||||
},
|
||||
|
||||
/*
|
||||
* nsISSLErrorListener
|
||||
*/
|
||||
notifySSLError: function(aSocketInfo, aError, aTargetSite) {
|
||||
this.sslStatus = null;
|
||||
return true;
|
||||
},
|
||||
|
||||
/*
|
||||
* nsITransportEventSink methods
|
||||
*/
|
||||
|
@ -590,8 +582,8 @@ const Socket = {
|
|||
|
||||
// Open the incoming and outgoing streams, and init the nsISocketTransport.
|
||||
_openStreams: function() {
|
||||
// Security notification callbacks (must support nsIBadCertListener2 and
|
||||
// nsISSLErrorListener for SSL connections, and possibly other interfaces).
|
||||
// Security notification callbacks (must support nsIBadCertListener2
|
||||
// for SSL connections, and possibly other interfaces).
|
||||
this.transport.securityCallbacks = this;
|
||||
|
||||
// Set the timeouts for the nsISocketTransport for both a connect event and
|
||||
|
@ -680,8 +672,7 @@ const Socket = {
|
|||
/* QueryInterface and nsIInterfaceRequestor implementations */
|
||||
_interfaces: [Ci.nsIServerSocketListener, Ci.nsIStreamListener,
|
||||
Ci.nsIRequestObserver, Ci.nsITransportEventSink,
|
||||
Ci.nsIBadCertListener2, Ci.nsISSLErrorListener,
|
||||
Ci.nsIProtocolProxyCallback],
|
||||
Ci.nsIBadCertListener2, Ci.nsIProtocolProxyCallback],
|
||||
QueryInterface: function(iid) {
|
||||
if (iid.equals(Ci.nsISupports) ||
|
||||
this._interfaces.some(function(i) i.equals(iid)))
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
/**
|
||||
* This class implements nsIBadCertListener. It's job is to prevent "bad cert"
|
||||
* security dialogs from being shown to the user. We call back to the
|
||||
* 'callback' object's methods "processCertError" and "processSSLError", so
|
||||
* that it can deal with it as needed (in the case of autoconfig, setting up
|
||||
* temporary overrides).
|
||||
* 'callback' object's method "processCertError" so that it can deal with it as
|
||||
* needed (in the case of autoconfig, setting up temporary overrides).
|
||||
*/
|
||||
function BadCertHandler(callback)
|
||||
{
|
||||
|
@ -26,11 +25,6 @@ BadCertHandler.prototype =
|
|||
return this._callback.processCertError(socketInfo, status, targetSite);
|
||||
},
|
||||
|
||||
// Suppress any ssl errors
|
||||
notifySSLError: function(socketInfo, error, targetSite) {
|
||||
return this._callback.processSSLError(socketInfo, status, targetSite);
|
||||
},
|
||||
|
||||
// nsIInterfaceRequestor
|
||||
getInterface: function(iid) {
|
||||
return this.QueryInterface(iid);
|
||||
|
@ -39,7 +33,6 @@ BadCertHandler.prototype =
|
|||
// nsISupports
|
||||
QueryInterface: function(iid) {
|
||||
if (!iid.equals(Components.interfaces.nsIBadCertListener2) &&
|
||||
!iid.equals(Components.interfaces.nsISSLErrorListener) &&
|
||||
!iid.equals(Components.interfaces.nsIInterfaceRequestor) &&
|
||||
!iid.equals(Components.interfaces.nsISupports))
|
||||
throw Components.results.NS_ERROR_NO_INTERFACE;
|
||||
|
|
|
@ -992,16 +992,6 @@ SSLErrorHandler.prototype =
|
|||
" flags=" + flags + "\n");
|
||||
return true;
|
||||
},
|
||||
|
||||
processSSLError : function(socketInfo, status, targetSite)
|
||||
{
|
||||
this._log.error("got SSL error, please implement the handler!");
|
||||
// XXX record that there was an SSL error, and tell the user
|
||||
// about it somehow
|
||||
// XXX test case?
|
||||
// return true if you want to suppress the default PSM dialog
|
||||
return false;
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче