diff --git a/b2g/installer/package-manifest.in b/b2g/installer/package-manifest.in index f46339e0ff1a..3f6e6fdf7b4a 100644 --- a/b2g/installer/package-manifest.in +++ b/b2g/installer/package-manifest.in @@ -432,8 +432,6 @@ @BINPATH@/components/nsHandlerService.js @BINPATH@/components/nsWebHandlerApp.manifest @BINPATH@/components/nsWebHandlerApp.js -@BINPATH@/components/nsBadCertHandler.manifest -@BINPATH@/components/nsBadCertHandler.js @BINPATH@/components/satchel.manifest @BINPATH@/components/nsFormAutoComplete.js @BINPATH@/components/nsFormHistory.js diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in index ac66aabcf174..de073a530b1f 100644 --- a/browser/installer/package-manifest.in +++ b/browser/installer/package-manifest.in @@ -420,8 +420,6 @@ @BINPATH@/components/nsHandlerService.js @BINPATH@/components/nsWebHandlerApp.manifest @BINPATH@/components/nsWebHandlerApp.js -@BINPATH@/components/nsBadCertHandler.manifest -@BINPATH@/components/nsBadCertHandler.js @BINPATH@/components/satchel.manifest @BINPATH@/components/nsFormAutoComplete.js @BINPATH@/components/nsFormHistory.js diff --git a/content/base/src/Makefile.in b/content/base/src/Makefile.in index df6231caf3b8..34a306d8077a 100644 --- a/content/base/src/Makefile.in +++ b/content/base/src/Makefile.in @@ -167,8 +167,6 @@ GQI_SRCS = contentbase.gqi FORCE_STATIC_LIB = 1 EXTRA_COMPONENTS = \ - $(srcdir)/nsBadCertHandler.js \ - nsBadCertHandler.manifest \ contentSecurityPolicy.manifest \ contentAreaDropListener.js \ contentAreaDropListener.manifest \ diff --git a/content/base/src/nsBadCertHandler.js b/content/base/src/nsBadCertHandler.js deleted file mode 100644 index 28119e4c2e91..000000000000 --- a/content/base/src/nsBadCertHandler.js +++ /dev/null @@ -1,45 +0,0 @@ -/* 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/. */ - -const Cc = Components.classes; -const Ci = Components.interfaces; -const Cr = Components.results; -const Cu = Components.utils; - -Cu.import("resource://gre/modules/XPCOMUtils.jsm"); - -/** - * This component's job is to prevent "bad cert" security dialogs from - * being shown to the user when in XHR backgroundRequest mode. This - * causes the request to simply fail if the certificate is bad. - */ -function BadCertHandler() { -} - -BadCertHandler.prototype = { - - // Suppress any certificate errors - notifyCertProblem: function(socketInfo, status, targetSite) { - return true; - }, - - // Suppress any ssl errors - notifySSLError: function(socketInfo, error, targetSite) { - return true; - }, - - // nsIInterfaceRequestor - getInterface: function(iid) { - return this.QueryInterface(iid); - }, - - // nsISupports - QueryInterface: XPCOMUtils.generateQI([Ci.nsIBadCertListener2, - Ci.nsISSLErrorListener, - Ci.nsIInterfaceRequestor]), - - classID: Components.ID("{dbded6ec-edbf-4054-a834-287b82c260f9}"), -}; - -this.NSGetFactory = XPCOMUtils.generateNSGetFactory([BadCertHandler]); diff --git a/content/base/src/nsBadCertHandler.manifest b/content/base/src/nsBadCertHandler.manifest deleted file mode 100644 index ee22fd13af35..000000000000 --- a/content/base/src/nsBadCertHandler.manifest +++ /dev/null @@ -1,2 +0,0 @@ -component {dbded6ec-edbf-4054-a834-287b82c260f9} nsBadCertHandler.js -contract @mozilla.org/content/xmlhttprequest-bad-cert-handler;1 {dbded6ec-edbf-4054-a834-287b82c260f9} \ No newline at end of file diff --git a/mobile/android/installer/package-manifest.in b/mobile/android/installer/package-manifest.in index a377cbabe0f8..7ef82a1187d3 100644 --- a/mobile/android/installer/package-manifest.in +++ b/mobile/android/installer/package-manifest.in @@ -336,8 +336,6 @@ @BINPATH@/components/nsHandlerService.js @BINPATH@/components/nsWebHandlerApp.manifest @BINPATH@/components/nsWebHandlerApp.js -@BINPATH@/components/nsBadCertHandler.manifest -@BINPATH@/components/nsBadCertHandler.js @BINPATH@/components/satchel.manifest @BINPATH@/components/nsFormAutoComplete.js @BINPATH@/components/nsFormHistory.js diff --git a/netwerk/base/src/NetUtil.jsm b/netwerk/base/src/NetUtil.jsm index 50dbf07a3b27..b1ba2c75ad6a 100644 --- a/netwerk/base/src/NetUtil.jsm +++ b/netwerk/base/src/NetUtil.jsm @@ -103,9 +103,6 @@ this.NetUtil = { * @param aSource * The nsIURI, nsIFile, string spec, nsIChannel, or nsIInputStream * to open. - * Note: If passing an nsIChannel whose notificationCallbacks is - * already set, callers are responsible for implementations - * of nsIBadCertListener/nsISSLErrorListener. * @param aCallback * The callback function that will be notified upon completion. It * will get two arguments: @@ -155,13 +152,6 @@ this.NetUtil = { channel = this.newChannel(aSource); } - // Add a BadCertHandler to suppress SSL/cert error dialogs, but only if - // the channel doesn't already have a notificationCallbacks. - if (!channel.notificationCallbacks) { - // Pass true to avoid optional redirect-cert-checking behavior. - channel.notificationCallbacks = new BadCertHandler(true); - } - channel.asyncOpen(listener, null); }, @@ -339,9 +329,3 @@ Components.utils.import("resource://gre/modules/XPCOMUtils.jsm"); // Define our lazy getters. XPCOMUtils.defineLazyServiceGetter(this, "ioUtil", "@mozilla.org/io-util;1", "nsIIOUtil"); - -XPCOMUtils.defineLazyGetter(this, "BadCertHandler", function () { - var obj = {}; - Cu.import("resource://gre/modules/CertUtils.jsm", obj); - return obj.BadCertHandler; -}); diff --git a/netwerk/protocol/http/HttpChannelParent.cpp b/netwerk/protocol/http/HttpChannelParent.cpp index 6e16a1322686..9e66298c3df2 100644 --- a/netwerk/protocol/http/HttpChannelParent.cpp +++ b/netwerk/protocol/http/HttpChannelParent.cpp @@ -13,7 +13,6 @@ #include "nsNetUtil.h" #include "nsISupportsPriority.h" #include "nsIAuthPromptProvider.h" -#include "nsIBadCertListener2.h" #include "nsICacheEntryDescriptor.h" #include "nsSerializationHelper.h" #include "nsISerializable.h" diff --git a/netwerk/protocol/http/HttpChannelParentListener.cpp b/netwerk/protocol/http/HttpChannelParentListener.cpp index 57eb778096ce..6427fc263fd5 100644 --- a/netwerk/protocol/http/HttpChannelParentListener.cpp +++ b/netwerk/protocol/http/HttpChannelParentListener.cpp @@ -14,7 +14,6 @@ #include "nsNetUtil.h" #include "nsISupportsPriority.h" #include "nsIAuthPromptProvider.h" -#include "nsIBadCertListener2.h" #include "nsICacheEntryDescriptor.h" #include "nsSerializationHelper.h" #include "nsISerializable.h" diff --git a/toolkit/components/places/nsLivemarkService.js b/toolkit/components/places/nsLivemarkService.js index 07ef3db19f38..9287161001fa 100644 --- a/toolkit/components/places/nsLivemarkService.js +++ b/toolkit/components/places/nsLivemarkService.js @@ -997,18 +997,6 @@ LivemarkLoadListener.prototype = { this._livemark.expireTime = Date.now() + aMilliseconds; }, - // nsIBadCertListener2 - notifyCertProblem: function LLL_certProblem(aSocketInfo, aStatus, aTargetSite) - { - return true; - }, - - // nsISSLErrorListener - notifySSLError: function LLL_SSLError(aSocketInfo, aError, aTargetSite) - { - return true; - }, - // nsIInterfaceRequestor getInterface: function LLL_getInterface(aIID) { @@ -1020,8 +1008,6 @@ LivemarkLoadListener.prototype = { Ci.nsIFeedResultListener , Ci.nsIStreamListener , Ci.nsIRequestObserver - , Ci.nsIBadCertListener2 - , Ci.nsISSLErrorListener , Ci.nsIInterfaceRequestor ]) } diff --git a/toolkit/components/search/nsSearchService.js b/toolkit/components/search/nsSearchService.js index 1a7b49bf47f9..5700f42d0f42 100644 --- a/toolkit/components/search/nsSearchService.js +++ b/toolkit/components/search/nsSearchService.js @@ -386,8 +386,6 @@ loadListener.prototype = { aIID.equals(Ci.nsIStreamListener) || aIID.equals(Ci.nsIChannelEventSink) || aIID.equals(Ci.nsIInterfaceRequestor) || - aIID.equals(Ci.nsIBadCertListener2) || - aIID.equals(Ci.nsISSLErrorListener) || // See FIXME comment below aIID.equals(Ci.nsIHttpEventSink) || aIID.equals(Ci.nsIProgressEventSink) || @@ -444,16 +442,6 @@ loadListener.prototype = { return this.QueryInterface(aIID); }, - // nsIBadCertListener2 - notifyCertProblem: function SRCH_certProblem(socketInfo, status, targetSite) { - return true; - }, - - // nsISSLErrorListener - notifySSLError: function SRCH_SSLError(socketInfo, error, targetSite) { - return true; - }, - // FIXME: bug 253127 // nsIHttpEventSink onRedirect: function (aChannel, aNewChannel) {}, diff --git a/toolkit/components/search/nsSearchSuggestions.js b/toolkit/components/search/nsSearchSuggestions.js index 6d756c1069d5..b4600396503e 100644 --- a/toolkit/components/search/nsSearchSuggestions.js +++ b/toolkit/components/search/nsSearchSuggestions.js @@ -464,7 +464,6 @@ SuggestAutoComplete.prototype = { this._suggestURI = submission.uri; var method = (submission.postData ? "POST" : "GET"); this._request.open(method, this._suggestURI.spec, true); - this._request.channel.notificationCallbacks = new SearchSuggestLoadListener(); if (this._request.channel instanceof Ci.nsIPrivateBrowsingChannel) { this._request.channel.setPrivate(privacyMode); } @@ -524,30 +523,6 @@ SuggestAutoComplete.prototype = { Ci.nsIAutoCompleteObserver]) }; -function SearchSuggestLoadListener() { -} -SearchSuggestLoadListener.prototype = { - // nsIBadCertListener2 - notifyCertProblem: function SSLL_certProblem(socketInfo, status, targetSite) { - return true; - }, - - // nsISSLErrorListener - notifySSLError: function SSLL_SSLError(socketInfo, error, targetSite) { - return true; - }, - - // nsIInterfaceRequestor - getInterface: function SSLL_getInterface(iid) { - return this.QueryInterface(iid); - }, - - // nsISupports - QueryInterface: XPCOMUtils.generateQI([Ci.nsIBadCertListener2, - Ci.nsISSLErrorListener, - Ci.nsIInterfaceRequestor]) -}; - /** * SearchSuggestAutoComplete is a service implementation that handles suggest * results specific to web searches. diff --git a/toolkit/components/url-classifier/content/xml-fetcher.js b/toolkit/components/url-classifier/content/xml-fetcher.js index 3b91400d5a6a..4217d80eff61 100644 --- a/toolkit/components/url-classifier/content/xml-fetcher.js +++ b/toolkit/components/url-classifier/content/xml-fetcher.js @@ -112,25 +112,13 @@ PROT_XMLFetcher.prototype = { fetcher._callback(responseText, status); }, - // Suppress any certificate errors - notifyCertProblem: function(socketInfo, status, targetSite) { - return true; - }, - - // Suppress any ssl errors - notifySSLError: function(socketInfo, error, targetSite) { - return true; - }, - // nsIInterfaceRequestor getInterface: function(iid) { return this.QueryInterface(iid); }, QueryInterface: function(iid) { - if (!iid.equals(Components.interfaces.nsIBadCertListener2) && - !iid.equals(Components.interfaces.nsISSLErrorListener) && - !iid.equals(Components.interfaces.nsIInterfaceRequestor) && + if (!iid.equals(Components.interfaces.nsIInterfaceRequestor) && !iid.equals(Components.interfaces.nsISupports)) throw Components.results.NS_ERROR_NO_INTERFACE; return this; diff --git a/toolkit/components/url-classifier/nsUrlClassifierStreamUpdater.cpp b/toolkit/components/url-classifier/nsUrlClassifierStreamUpdater.cpp index e2cf4e3879e2..f9ea89ada439 100644 --- a/toolkit/components/url-classifier/nsUrlClassifierStreamUpdater.cpp +++ b/toolkit/components/url-classifier/nsUrlClassifierStreamUpdater.cpp @@ -42,14 +42,12 @@ nsUrlClassifierStreamUpdater::nsUrlClassifierStreamUpdater() } -NS_IMPL_THREADSAFE_ISUPPORTS9(nsUrlClassifierStreamUpdater, +NS_IMPL_THREADSAFE_ISUPPORTS7(nsUrlClassifierStreamUpdater, nsIUrlClassifierStreamUpdater, nsIUrlClassifierUpdateObserver, nsIRequestObserver, nsIStreamListener, nsIObserver, - nsIBadCertListener2, - nsISSLErrorListener, nsIInterfaceRequestor, nsITimerCallback) @@ -525,32 +523,6 @@ nsUrlClassifierStreamUpdater::Observe(nsISupports *aSubject, const char *aTopic, return NS_OK; } -/////////////////////////////////////////////////////////////////////////////// -// nsIBadCertListener2 implementation - -NS_IMETHODIMP -nsUrlClassifierStreamUpdater::NotifyCertProblem(nsIInterfaceRequestor *socketInfo, - nsISSLStatus *status, - const nsACString &targetSite, - bool *_retval) -{ - *_retval = true; - return NS_OK; -} - -/////////////////////////////////////////////////////////////////////////////// -// nsISSLErrorListener implementation - -NS_IMETHODIMP -nsUrlClassifierStreamUpdater::NotifySSLError(nsIInterfaceRequestor *socketInfo, - int32_t error, - const nsACString &targetSite, - bool *_retval) -{ - *_retval = true; - return NS_OK; -} - /////////////////////////////////////////////////////////////////////////////// // nsIInterfaceRequestor implementation diff --git a/toolkit/components/url-classifier/nsUrlClassifierStreamUpdater.h b/toolkit/components/url-classifier/nsUrlClassifierStreamUpdater.h index c83a02b125b0..4c23d8aa7f34 100644 --- a/toolkit/components/url-classifier/nsUrlClassifierStreamUpdater.h +++ b/toolkit/components/url-classifier/nsUrlClassifierStreamUpdater.h @@ -14,8 +14,6 @@ #include "nsIStreamListener.h" #include "nsNetUtil.h" #include "nsTArray.h" -#include "nsIBadCertListener2.h" -#include "nsISSLErrorListener.h" #include "nsITimer.h" #include "mozilla/Attributes.h" @@ -26,8 +24,6 @@ class nsUrlClassifierStreamUpdater MOZ_FINAL : public nsIUrlClassifierStreamUpda public nsIUrlClassifierUpdateObserver, public nsIStreamListener, public nsIObserver, - public nsIBadCertListener2, - public nsISSLErrorListener, public nsIInterfaceRequestor, public nsITimerCallback { @@ -40,8 +36,6 @@ public: NS_DECL_NSIINTERFACEREQUESTOR NS_DECL_NSIREQUESTOBSERVER NS_DECL_NSISTREAMLISTENER - NS_DECL_NSIBADCERTLISTENER2 - NS_DECL_NSISSLERRORLISTENER NS_DECL_NSIOBSERVER NS_DECL_NSITIMERCALLBACK diff --git a/toolkit/mozapps/shared/CertUtils.jsm b/toolkit/mozapps/shared/CertUtils.jsm index 277ce821b00f..bce6b65a7cb5 100644 --- a/toolkit/mozapps/shared/CertUtils.jsm +++ b/toolkit/mozapps/shared/CertUtils.jsm @@ -209,16 +209,6 @@ BadCertHandler.prototype = { callback.onRedirectVerifyCallback(Components.results.NS_OK); }, - // Suppress any certificate errors - notifyCertProblem: function(socketInfo, status, targetSite) { - return true; - }, - - // Suppress any ssl errors - notifySSLError: function(socketInfo, error, targetSite) { - return true; - }, - // nsIInterfaceRequestor getInterface: function(iid) { return this.QueryInterface(iid); @@ -227,8 +217,6 @@ BadCertHandler.prototype = { // nsISupports QueryInterface: function(iid) { if (!iid.equals(Ci.nsIChannelEventSink) && - !iid.equals(Ci.nsIBadCertListener2) && - !iid.equals(Ci.nsISSLErrorListener) && !iid.equals(Ci.nsIInterfaceRequestor) && !iid.equals(Ci.nsISupports)) throw Cr.NS_ERROR_NO_INTERFACE;