Bug 1143105 - remove unnecessary nsISSLErrorListener implementations in comm-central. r=jcranmer,clokep

This commit is contained in:
David Keeler 2015-03-20 00:58:28 +01:00
Родитель 7be0e2d320
Коммит c90c70bdee
3 изменённых файлов: 6 добавлений и 32 удалений

Просмотреть файл

@ -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;
},
}