зеркало из https://github.com/mozilla/pjs.git
b=166664 Remove obsolete interface nsISecurityManagerComponent
r=javi sr=alecf
This commit is contained in:
Родитель
c5b35f4a35
Коммит
f74fb820fc
|
@ -50,6 +50,5 @@ nsIWebFilters.idl
|
|||
nsISecurityEventSink.idl
|
||||
nsISecretDecoderRing.idl
|
||||
nsISecureBrowserUI.idl
|
||||
nsISecurityManagerComponent.idl
|
||||
nsIByteRangeRequest.idl
|
||||
nsIMultiPartChannel.idl
|
||||
|
|
|
@ -87,7 +87,6 @@ XPIDLSRCS = \
|
|||
nsISecurityEventSink.idl \
|
||||
nsISecretDecoderRing.idl \
|
||||
nsISecureBrowserUI.idl \
|
||||
nsISecurityManagerComponent.idl \
|
||||
nsICachingChannel.idl \
|
||||
nsIByteRangeRequest.idl \
|
||||
nsIMultiPartChannel.idl \
|
||||
|
|
|
@ -1253,13 +1253,6 @@
|
|||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsISecurityManagerComponent.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsISSLSocketProvider.idl</PATH>
|
||||
|
@ -1802,11 +1795,6 @@
|
|||
<PATH>nsISecureBrowserUI.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsISecurityManagerComponent.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsISSLSocketProvider.idl</PATH>
|
||||
|
@ -3177,13 +3165,6 @@
|
|||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsISecurityManagerComponent.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsISSLSocketProvider.idl</PATH>
|
||||
|
@ -3721,11 +3702,6 @@
|
|||
<PATH>nsISecureBrowserUI.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsISecurityManagerComponent.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsISSLSocketProvider.idl</PATH>
|
||||
|
@ -4142,12 +4118,6 @@
|
|||
<PATH>nsISecureBrowserUI.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>headers</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsISecurityManagerComponent.idl</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>headers</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
|
|
|
@ -1447,10 +1447,6 @@ nsCrypto::GenerateCRMFRequest(nsIDOMCRMFObject** aReturn)
|
|||
nrv = holder->GetJSObject(&script_obj);
|
||||
NS_ENSURE_SUCCESS(nrv, nrv);
|
||||
|
||||
// Before doing this, lets' make sure the NSS Component has
|
||||
// initialized itself.
|
||||
nsCOMPtr<nsISecurityManagerComponent> nss =
|
||||
do_GetService(PSM_COMPONENT_CONTRACTID);
|
||||
//Put up some UI warning that someone is trying to
|
||||
//escrow the private key.
|
||||
//Don't addref this copy. That way ths reference goes away
|
||||
|
@ -2039,8 +2035,6 @@ nsCrypto::Alert(const nsAString& aMessage)
|
|||
NS_IMETHODIMP
|
||||
nsCrypto::Logout()
|
||||
{
|
||||
nsCOMPtr<nsISecurityManagerComponent> nss =
|
||||
do_GetService(PSM_COMPONENT_CONTRACTID);
|
||||
PK11_LogoutAll();
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -1098,21 +1098,13 @@ nsNSSComponent::Init()
|
|||
}
|
||||
|
||||
/* nsISupports Implementation for the class */
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS6(nsNSSComponent,
|
||||
nsISecurityManagerComponent,
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS5(nsNSSComponent,
|
||||
nsISignatureVerifier,
|
||||
nsIEntropyCollector,
|
||||
nsINSSComponent,
|
||||
nsIObserver,
|
||||
nsISupportsWeakReference);
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsNSSComponent::DisplaySecurityAdvisor()
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED; // not implemented
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------
|
||||
// Functions Implementing nsISignatureVerifier
|
||||
//---------------------------------------------
|
||||
|
@ -1144,15 +1136,6 @@ nsNSSComponent::HashEnd(HASHContext* ctx, unsigned char** hash,
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsNSSComponent::GetPassword(char **aRet)
|
||||
{
|
||||
// This functionality is only used in wallet.
|
||||
// This interface can go away once we get rid of PSM 1.x.
|
||||
*aRet = nsnull;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
/* Callback functions for decoder. For now, use empty/default functions. */
|
||||
static void ContentCallback(void *arg,
|
||||
const char *buf,
|
||||
|
@ -1611,7 +1594,6 @@ PSMContentDownloader::PSMContentDownloader(PRUint32 type)
|
|||
mDoSilentDownload(PR_FALSE)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
mNSS = do_GetService(PSM_COMPONENT_CONTRACTID);
|
||||
}
|
||||
|
||||
PSMContentDownloader::~PSMContentDownloader()
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#define _nsNSSComponent_h_
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsISecurityManagerComponent.h"
|
||||
#include "nsISignatureVerifier.h"
|
||||
#include "nsIURIContentListener.h"
|
||||
#include "nsIStreamListener.h"
|
||||
|
@ -50,6 +49,9 @@
|
|||
#define NS_NSSCOMPONENT_CID \
|
||||
{0xa277189c, 0x1dd1, 0x11b2, {0xa8, 0xc9, 0xe4, 0xe8, 0xbf, 0xb1, 0x33, 0x8e}}
|
||||
|
||||
#define PSM_COMPONENT_CONTRACTID "@mozilla.org/psm;1"
|
||||
#define PSM_COMPONENT_CLASSNAME "Mozilla PSM Component"
|
||||
|
||||
//Define an interface that we can use to look up from the
|
||||
//callbacks passed to NSS.
|
||||
|
||||
|
@ -91,7 +93,6 @@ protected:
|
|||
PRUint32 mType;
|
||||
PRBool mDoSilentDownload;
|
||||
nsAutoString mCrlAutoDownloadKey;
|
||||
nsCOMPtr<nsISecurityManagerComponent> mNSS;
|
||||
nsCOMPtr<nsIURI> mURI;
|
||||
nsresult handleContentDownloadError(nsresult errCode);
|
||||
};
|
||||
|
@ -130,8 +131,7 @@ class NS_NO_VTABLE nsINSSComponent : public nsISupports {
|
|||
struct PRLock;
|
||||
|
||||
// Implementation of the PSM component interface.
|
||||
class nsNSSComponent : public nsISecurityManagerComponent,
|
||||
public nsISignatureVerifier,
|
||||
class nsNSSComponent : public nsISignatureVerifier,
|
||||
public nsIEntropyCollector,
|
||||
public nsINSSComponent,
|
||||
public nsIObserver,
|
||||
|
@ -145,7 +145,6 @@ public:
|
|||
virtual ~nsNSSComponent();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSISECURITYMANAGERCOMPONENT
|
||||
NS_DECL_NSISIGNATUREVERIFIER
|
||||
NS_DECL_NSIENTROPYCOLLECTOR
|
||||
NS_DECL_NSIOBSERVER
|
||||
|
|
|
@ -42,7 +42,6 @@
|
|||
#include "prnetdb.h"
|
||||
#include "nsIPrompt.h"
|
||||
#include "nsIPref.h"
|
||||
#include "nsISecurityManagerComponent.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIWebProgressListener.h"
|
||||
#include "nsIChannel.h"
|
||||
|
@ -1110,7 +1109,7 @@ nsSSLIOLayerWrite(PRFileDesc* fd, const void* buf, PRInt32 amount)
|
|||
return bytesWritten;
|
||||
}
|
||||
|
||||
nsresult InitNSSMethods()
|
||||
static void InitNSSMethods()
|
||||
{
|
||||
nsSSLIOLayerIdentity = PR_GetUniqueIdentity("NSS layer");
|
||||
nsSSLIOLayerMethods = *PR_GetDefaultIOMethods();
|
||||
|
@ -1120,14 +1119,6 @@ nsresult InitNSSMethods()
|
|||
nsSSLIOLayerMethods.available = nsSSLIOLayerAvailable;
|
||||
nsSSLIOLayerMethods.write = nsSSLIOLayerWrite;
|
||||
nsSSLIOLayerMethods.read = nsSSLIOLayerRead;
|
||||
|
||||
/* Make sure NSS has been loaded.
|
||||
* We rely on the NSS component to keep itself loaded
|
||||
* until the application shuts down.
|
||||
*/
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsISupports> loader = do_GetService(PSM_COMPONENT_CONTRACTID, &rv);
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
@ -1141,8 +1132,7 @@ nsSSLIOLayerNewSocket(const char *host,
|
|||
{
|
||||
// XXX - this code is duplicated in nsSSLIOLayerAddToSocket
|
||||
if (firstTime) {
|
||||
nsresult rv = InitNSSMethods();
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
InitNSSMethods();
|
||||
gTLSIntolerantSites = new nsHashtable(16, PR_TRUE);
|
||||
if (!gTLSIntolerantSites) return NS_ERROR_OUT_OF_MEMORY;
|
||||
firstTime = PR_FALSE;
|
||||
|
@ -2229,8 +2219,7 @@ nsSSLIOLayerAddToSocket(const char* host,
|
|||
|
||||
// XXX - this code is duplicated in nsSSLIONewSocket
|
||||
if (firstTime) {
|
||||
rv = InitNSSMethods();
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
InitNSSMethods();
|
||||
gTLSIntolerantSites = new nsHashtable(16, PR_TRUE);
|
||||
if (!gTLSIntolerantSites) return NS_ERROR_OUT_OF_MEMORY;
|
||||
firstTime = PR_FALSE;
|
||||
|
|
|
@ -61,7 +61,7 @@ static void EnsureNSSInitialized(PRBool triggeredByNSSComponent)
|
|||
haveLoaded = PR_TRUE;
|
||||
|
||||
if (triggeredByNSSComponent) {
|
||||
// Me must prevent a recursion, as nsNSSComponent creates
|
||||
// We must prevent a recursion, as nsNSSComponent creates
|
||||
// additional instances
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsIInterfaceRequestorUtils.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsISecurityManagerComponent.h"
|
||||
#include "nsIWindowWatcher.h"
|
||||
#include "nsIPrompt.h"
|
||||
#include "nsProxiedService.h"
|
||||
|
@ -107,10 +106,6 @@ nsSecretDecoderRing::nsSecretDecoderRing()
|
|||
{
|
||||
// initialize superclass
|
||||
NS_INIT_ISUPPORTS();
|
||||
|
||||
// (Possibly) create the Security Manager component to get things
|
||||
// initialized
|
||||
nsCOMPtr<nsISecurityManagerComponent> nss = do_GetService(PSM_COMPONENT_CONTRACTID);
|
||||
}
|
||||
|
||||
// nsSecretDecoderRing destructor
|
||||
|
|
Загрузка…
Ссылка в новой задаче