michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: * michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "mozilla/ModuleUtils.h" michael@0: michael@0: #include "nsNSSComponent.h" michael@0: #include "nsSSLSocketProvider.h" michael@0: #include "nsTLSSocketProvider.h" michael@0: #include "nsKeygenHandler.h" michael@0: michael@0: #include "nsSDR.h" michael@0: michael@0: #include "nsPK11TokenDB.h" michael@0: #include "nsPKCS11Slot.h" michael@0: #include "nsNSSCertificate.h" michael@0: #include "nsNSSCertificateFakeTransport.h" michael@0: #include "nsNSSCertificateDB.h" michael@0: #include "nsNSSCertCache.h" michael@0: #include "nsCMS.h" michael@0: #ifdef MOZ_XUL michael@0: #include "nsCertTree.h" michael@0: #endif michael@0: #include "nsCrypto.h" michael@0: #include "nsCryptoHash.h" michael@0: //For the NS_CRYPTO_CONTRACTID define michael@0: #include "nsDOMCID.h" michael@0: #include "nsNetCID.h" michael@0: #include "nsCMSSecureMessage.h" michael@0: #include "nsCertPicker.h" michael@0: #include "nsCURILoader.h" michael@0: #include "nsICategoryManager.h" michael@0: #include "nsNTLMAuthModule.h" michael@0: #include "nsStreamCipher.h" michael@0: #include "nsKeyModule.h" michael@0: #include "nsDataSignatureVerifier.h" michael@0: #include "nsCertOverrideService.h" michael@0: #include "nsRandomGenerator.h" michael@0: #include "nsSSLStatus.h" michael@0: #include "TransportSecurityInfo.h" michael@0: #include "NSSErrorsService.h" michael@0: #include "nsNSSVersion.h" michael@0: michael@0: #include "nsXULAppAPI.h" michael@0: michael@0: #include "PSMContentListener.h" michael@0: michael@0: #define NS_IS_PROCESS_DEFAULT \ michael@0: (GeckoProcessType_Default == XRE_GetProcessType()) michael@0: michael@0: #define NS_NSS_INSTANTIATE(ensureOperator, _InstanceClass) \ michael@0: PR_BEGIN_MACRO \ michael@0: _InstanceClass * inst; \ michael@0: inst = new _InstanceClass(); \ michael@0: NS_ADDREF(inst); \ michael@0: rv = inst->QueryInterface(aIID, aResult); \ michael@0: NS_RELEASE(inst); \ michael@0: PR_END_MACRO michael@0: michael@0: #define NS_NSS_INSTANTIATE_INIT(ensureOperator, _InstanceClass, _InitMethod) \ michael@0: PR_BEGIN_MACRO \ michael@0: _InstanceClass * inst; \ michael@0: inst = new _InstanceClass(); \ michael@0: NS_ADDREF(inst); \ michael@0: rv = inst->_InitMethod(); \ michael@0: if(NS_SUCCEEDED(rv)) { \ michael@0: rv = inst->QueryInterface(aIID, aResult); \ michael@0: } \ michael@0: NS_RELEASE(inst); \ michael@0: PR_END_MACRO michael@0: michael@0: michael@0: #define NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(ensureOperator, \ michael@0: _InstanceClass) \ michael@0: NS_NSS_GENERIC_FACTORY_CONSTRUCTOR_BYPROCESS(ensureOperator, \ michael@0: _InstanceClass, \ michael@0: _InstanceClass) michael@0: michael@0: // These two macros are ripped off from nsIGenericFactory.h and slightly michael@0: // modified. michael@0: #define NS_NSS_GENERIC_FACTORY_CONSTRUCTOR_BYPROCESS(ensureOperator, \ michael@0: _InstanceClassChrome, \ michael@0: _InstanceClassContent) \ michael@0: static nsresult \ michael@0: _InstanceClassChrome##Constructor(nsISupports *aOuter, REFNSIID aIID, \ michael@0: void **aResult) \ michael@0: { \ michael@0: nsresult rv; \ michael@0: \ michael@0: *aResult = nullptr; \ michael@0: if (nullptr != aOuter) { \ michael@0: rv = NS_ERROR_NO_AGGREGATION; \ michael@0: return rv; \ michael@0: } \ michael@0: \ michael@0: if (!EnsureNSSInitialized(ensureOperator)) \ michael@0: return NS_ERROR_FAILURE; \ michael@0: \ michael@0: if (NS_IS_PROCESS_DEFAULT) \ michael@0: NS_NSS_INSTANTIATE(ensureOperator, _InstanceClassChrome); \ michael@0: else \ michael@0: NS_NSS_INSTANTIATE(ensureOperator, _InstanceClassContent); \ michael@0: \ michael@0: if (ensureOperator == nssLoadingComponent) \ michael@0: { \ michael@0: if (NS_SUCCEEDED(rv)) \ michael@0: EnsureNSSInitialized(nssInitSucceeded); \ michael@0: else \ michael@0: EnsureNSSInitialized(nssInitFailed); \ michael@0: } \ michael@0: \ michael@0: return rv; \ michael@0: } michael@0: michael@0: michael@0: #define NS_NSS_GENERIC_FACTORY_CONSTRUCTOR_INIT(ensureOperator, \ michael@0: _InstanceClass, \ michael@0: _InitMethod) \ michael@0: NS_NSS_GENERIC_FACTORY_CONSTRUCTOR_INIT_BYPROCESS(ensureOperator, \ michael@0: _InstanceClass, \ michael@0: _InstanceClass, \ michael@0: _InitMethod) michael@0: michael@0: #define NS_NSS_GENERIC_FACTORY_CONSTRUCTOR_INIT_BYPROCESS(ensureOperator, \ michael@0: _InstanceClassChrome, \ michael@0: _InstanceClassContent, \ michael@0: _InitMethod) \ michael@0: static nsresult \ michael@0: _InstanceClassChrome##Constructor(nsISupports *aOuter, REFNSIID aIID, \ michael@0: void **aResult) \ michael@0: { \ michael@0: nsresult rv; \ michael@0: \ michael@0: *aResult = nullptr; \ michael@0: if (nullptr != aOuter) { \ michael@0: rv = NS_ERROR_NO_AGGREGATION; \ michael@0: return rv; \ michael@0: } \ michael@0: \ michael@0: if (!EnsureNSSInitialized(ensureOperator)) \ michael@0: return NS_ERROR_FAILURE; \ michael@0: \ michael@0: if (NS_IS_PROCESS_DEFAULT) \ michael@0: NS_NSS_INSTANTIATE_INIT(ensureOperator, \ michael@0: _InstanceClassChrome, \ michael@0: _InitMethod); \ michael@0: else \ michael@0: NS_NSS_INSTANTIATE_INIT(ensureOperator, \ michael@0: _InstanceClassContent, \ michael@0: _InitMethod); \ michael@0: \ michael@0: if (ensureOperator == nssLoadingComponent) \ michael@0: { \ michael@0: if (NS_SUCCEEDED(rv)) \ michael@0: EnsureNSSInitialized(nssInitSucceeded); \ michael@0: else \ michael@0: EnsureNSSInitialized(nssInitFailed); \ michael@0: } \ michael@0: \ michael@0: return rv; \ michael@0: } michael@0: michael@0: NS_NSS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nssLoadingComponent, nsNSSComponent, michael@0: Init) michael@0: michael@0: using namespace mozilla::psm; michael@0: michael@0: namespace { michael@0: michael@0: // Use the special factory constructor for everything this module implements, michael@0: // because all code could potentially require the NSS library. michael@0: // Our factory constructor takes an additional boolean parameter. michael@0: // Only for the nsNSSComponent, set this to true. michael@0: // All other classes must have this set to false. michael@0: michael@0: NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(nssEnsure, nsSSLSocketProvider) michael@0: NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(nssEnsure, nsTLSSocketProvider) michael@0: NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(nssEnsure, nsSecretDecoderRing) michael@0: NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(nssEnsure, nsPK11TokenDB) michael@0: NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(nssEnsure, nsPKCS11ModuleDB) michael@0: NS_NSS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nssEnsure, PSMContentListener, init) michael@0: NS_NSS_GENERIC_FACTORY_CONSTRUCTOR_BYPROCESS(nssEnsureOnChromeOnly, michael@0: nsNSSCertificate, michael@0: nsNSSCertificateFakeTransport) michael@0: NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(nssEnsure, nsNSSCertificateDB) michael@0: NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(nssEnsure, nsNSSCertCache) michael@0: NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(nssEnsure, nsNSSCertList) michael@0: #ifdef MOZ_XUL michael@0: NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(nssEnsure, nsCertTree) michael@0: #endif michael@0: #ifndef MOZ_DISABLE_CRYPTOLEGACY michael@0: NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(nssEnsure, nsCrypto) michael@0: #endif michael@0: NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(nssEnsure, nsPkcs11) michael@0: NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(nssEnsure, nsCMSSecureMessage) michael@0: NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(nssEnsure, nsCMSDecoder) michael@0: NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(nssEnsure, nsCMSEncoder) michael@0: NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(nssEnsure, nsCMSMessage) michael@0: NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(nssEnsure, nsCertPicker) michael@0: NS_NSS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nssEnsure, nsNTLMAuthModule, InitTest) michael@0: NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(nssEnsure, nsCryptoHash) michael@0: NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(nssEnsure, nsCryptoHMAC) michael@0: NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(nssEnsure, nsStreamCipher) michael@0: NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(nssEnsure, nsKeyObject) michael@0: NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(nssEnsure, nsKeyObjectFactory) michael@0: NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(nssEnsure, nsDataSignatureVerifier) michael@0: NS_NSS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nssEnsure, nsCertOverrideService, Init) michael@0: NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(nssEnsure, nsRandomGenerator) michael@0: NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(nssEnsureOnChromeOnly, nsSSLStatus) michael@0: NS_NSS_GENERIC_FACTORY_CONSTRUCTOR(nssEnsureOnChromeOnly, TransportSecurityInfo) michael@0: michael@0: typedef mozilla::psm::NSSErrorsService NSSErrorsService; michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(NSSErrorsService, Init) michael@0: NS_GENERIC_FACTORY_CONSTRUCTOR(nsNSSVersion) michael@0: michael@0: NS_DEFINE_NAMED_CID(NS_NSSCOMPONENT_CID); michael@0: NS_DEFINE_NAMED_CID(NS_SSLSOCKETPROVIDER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_STARTTLSSOCKETPROVIDER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_SDR_CID); michael@0: NS_DEFINE_NAMED_CID(NS_PK11TOKENDB_CID); michael@0: NS_DEFINE_NAMED_CID(NS_PKCS11MODULEDB_CID); michael@0: NS_DEFINE_NAMED_CID(NS_PSMCONTENTLISTEN_CID); michael@0: NS_DEFINE_NAMED_CID(NS_X509CERT_CID); michael@0: NS_DEFINE_NAMED_CID(NS_X509CERTDB_CID); michael@0: NS_DEFINE_NAMED_CID(NS_X509CERTLIST_CID); michael@0: NS_DEFINE_NAMED_CID(NS_NSSCERTCACHE_CID); michael@0: NS_DEFINE_NAMED_CID(NS_FORMPROCESSOR_CID); michael@0: #ifdef MOZ_XUL michael@0: NS_DEFINE_NAMED_CID(NS_CERTTREE_CID); michael@0: #endif michael@0: NS_DEFINE_NAMED_CID(NS_PKCS11_CID); michael@0: #ifndef MOZ_DISABLE_CRYPTOLEGACY michael@0: NS_DEFINE_NAMED_CID(NS_CRYPTO_CID); michael@0: #endif michael@0: NS_DEFINE_NAMED_CID(NS_CMSSECUREMESSAGE_CID); michael@0: NS_DEFINE_NAMED_CID(NS_CMSDECODER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_CMSENCODER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_CMSMESSAGE_CID); michael@0: NS_DEFINE_NAMED_CID(NS_CRYPTO_HASH_CID); michael@0: NS_DEFINE_NAMED_CID(NS_CRYPTO_HMAC_CID); michael@0: NS_DEFINE_NAMED_CID(NS_CERT_PICKER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_NTLMAUTHMODULE_CID); michael@0: NS_DEFINE_NAMED_CID(NS_STREAMCIPHER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_KEYMODULEOBJECT_CID); michael@0: NS_DEFINE_NAMED_CID(NS_KEYMODULEOBJECTFACTORY_CID); michael@0: NS_DEFINE_NAMED_CID(NS_DATASIGNATUREVERIFIER_CID); michael@0: NS_DEFINE_NAMED_CID(NS_CERTOVERRIDE_CID); michael@0: NS_DEFINE_NAMED_CID(NS_RANDOMGENERATOR_CID); michael@0: NS_DEFINE_NAMED_CID(NS_SSLSTATUS_CID); michael@0: NS_DEFINE_NAMED_CID(TRANSPORTSECURITYINFO_CID); michael@0: NS_DEFINE_NAMED_CID(NS_NSSERRORSSERVICE_CID); michael@0: NS_DEFINE_NAMED_CID(NS_NSSVERSION_CID); michael@0: michael@0: static const mozilla::Module::CIDEntry kNSSCIDs[] = { michael@0: { &kNS_NSSCOMPONENT_CID, false, nullptr, nsNSSComponentConstructor }, michael@0: { &kNS_SSLSOCKETPROVIDER_CID, false, nullptr, nsSSLSocketProviderConstructor }, michael@0: { &kNS_STARTTLSSOCKETPROVIDER_CID, false, nullptr, nsTLSSocketProviderConstructor }, michael@0: { &kNS_SDR_CID, false, nullptr, nsSecretDecoderRingConstructor }, michael@0: { &kNS_PK11TOKENDB_CID, false, nullptr, nsPK11TokenDBConstructor }, michael@0: { &kNS_PKCS11MODULEDB_CID, false, nullptr, nsPKCS11ModuleDBConstructor }, michael@0: { &kNS_PSMCONTENTLISTEN_CID, false, nullptr, PSMContentListenerConstructor }, michael@0: { &kNS_X509CERT_CID, false, nullptr, nsNSSCertificateConstructor }, michael@0: { &kNS_X509CERTDB_CID, false, nullptr, nsNSSCertificateDBConstructor }, michael@0: { &kNS_X509CERTLIST_CID, false, nullptr, nsNSSCertListConstructor }, michael@0: { &kNS_NSSCERTCACHE_CID, false, nullptr, nsNSSCertCacheConstructor }, michael@0: { &kNS_FORMPROCESSOR_CID, false, nullptr, nsKeygenFormProcessor::Create }, michael@0: #ifdef MOZ_XUL michael@0: { &kNS_CERTTREE_CID, false, nullptr, nsCertTreeConstructor }, michael@0: #endif michael@0: { &kNS_PKCS11_CID, false, nullptr, nsPkcs11Constructor }, michael@0: #ifndef MOZ_DISABLE_CRYPTOLEGACY michael@0: { &kNS_CRYPTO_CID, false, nullptr, nsCryptoConstructor }, michael@0: #endif michael@0: { &kNS_CMSSECUREMESSAGE_CID, false, nullptr, nsCMSSecureMessageConstructor }, michael@0: { &kNS_CMSDECODER_CID, false, nullptr, nsCMSDecoderConstructor }, michael@0: { &kNS_CMSENCODER_CID, false, nullptr, nsCMSEncoderConstructor }, michael@0: { &kNS_CMSMESSAGE_CID, false, nullptr, nsCMSMessageConstructor }, michael@0: { &kNS_CRYPTO_HASH_CID, false, nullptr, nsCryptoHashConstructor }, michael@0: { &kNS_CRYPTO_HMAC_CID, false, nullptr, nsCryptoHMACConstructor }, michael@0: { &kNS_CERT_PICKER_CID, false, nullptr, nsCertPickerConstructor }, michael@0: { &kNS_NTLMAUTHMODULE_CID, false, nullptr, nsNTLMAuthModuleConstructor }, michael@0: { &kNS_STREAMCIPHER_CID, false, nullptr, nsStreamCipherConstructor }, michael@0: { &kNS_KEYMODULEOBJECT_CID, false, nullptr, nsKeyObjectConstructor }, michael@0: { &kNS_KEYMODULEOBJECTFACTORY_CID, false, nullptr, nsKeyObjectFactoryConstructor }, michael@0: { &kNS_DATASIGNATUREVERIFIER_CID, false, nullptr, nsDataSignatureVerifierConstructor }, michael@0: { &kNS_CERTOVERRIDE_CID, false, nullptr, nsCertOverrideServiceConstructor }, michael@0: { &kNS_RANDOMGENERATOR_CID, false, nullptr, nsRandomGeneratorConstructor }, michael@0: { &kNS_SSLSTATUS_CID, false, nullptr, nsSSLStatusConstructor }, michael@0: { &kTRANSPORTSECURITYINFO_CID, false, nullptr, TransportSecurityInfoConstructor }, michael@0: { &kNS_NSSERRORSSERVICE_CID, false, nullptr, NSSErrorsServiceConstructor }, michael@0: { &kNS_NSSVERSION_CID, false, nullptr, nsNSSVersionConstructor }, michael@0: { nullptr } michael@0: }; michael@0: michael@0: static const mozilla::Module::ContractIDEntry kNSSContracts[] = { michael@0: { PSM_COMPONENT_CONTRACTID, &kNS_NSSCOMPONENT_CID }, michael@0: { NS_NSS_ERRORS_SERVICE_CONTRACTID, &kNS_NSSERRORSSERVICE_CID }, michael@0: { NS_NSSVERSION_CONTRACTID, &kNS_NSSVERSION_CID }, michael@0: { NS_SSLSOCKETPROVIDER_CONTRACTID, &kNS_SSLSOCKETPROVIDER_CID }, michael@0: { NS_STARTTLSSOCKETPROVIDER_CONTRACTID, &kNS_STARTTLSSOCKETPROVIDER_CID }, michael@0: { NS_SDR_CONTRACTID, &kNS_SDR_CID }, michael@0: { NS_PK11TOKENDB_CONTRACTID, &kNS_PK11TOKENDB_CID }, michael@0: { NS_PKCS11MODULEDB_CONTRACTID, &kNS_PKCS11MODULEDB_CID }, michael@0: { NS_PSMCONTENTLISTEN_CONTRACTID, &kNS_PSMCONTENTLISTEN_CID }, michael@0: { NS_X509CERTDB_CONTRACTID, &kNS_X509CERTDB_CID }, michael@0: { NS_X509CERTLIST_CONTRACTID, &kNS_X509CERTLIST_CID }, michael@0: { NS_NSSCERTCACHE_CONTRACTID, &kNS_NSSCERTCACHE_CID }, michael@0: { NS_FORMPROCESSOR_CONTRACTID, &kNS_FORMPROCESSOR_CID }, michael@0: #ifdef MOZ_XUL michael@0: { NS_CERTTREE_CONTRACTID, &kNS_CERTTREE_CID }, michael@0: #endif michael@0: { NS_PKCS11_CONTRACTID, &kNS_PKCS11_CID }, michael@0: #ifndef MOZ_DISABLE_CRYPTOLEGACY michael@0: { NS_CRYPTO_CONTRACTID, &kNS_CRYPTO_CID }, michael@0: #endif michael@0: { NS_CMSSECUREMESSAGE_CONTRACTID, &kNS_CMSSECUREMESSAGE_CID }, michael@0: { NS_CMSDECODER_CONTRACTID, &kNS_CMSDECODER_CID }, michael@0: { NS_CMSENCODER_CONTRACTID, &kNS_CMSENCODER_CID }, michael@0: { NS_CMSMESSAGE_CONTRACTID, &kNS_CMSMESSAGE_CID }, michael@0: { NS_CRYPTO_HASH_CONTRACTID, &kNS_CRYPTO_HASH_CID }, michael@0: { NS_CRYPTO_HMAC_CONTRACTID, &kNS_CRYPTO_HMAC_CID }, michael@0: { NS_CERT_PICKER_CONTRACTID, &kNS_CERT_PICKER_CID }, michael@0: { "@mozilla.org/uriloader/psm-external-content-listener;1", &kNS_PSMCONTENTLISTEN_CID }, michael@0: { NS_CRYPTO_FIPSINFO_SERVICE_CONTRACTID, &kNS_PKCS11MODULEDB_CID }, michael@0: { NS_NTLMAUTHMODULE_CONTRACTID, &kNS_NTLMAUTHMODULE_CID }, michael@0: { NS_STREAMCIPHER_CONTRACTID, &kNS_STREAMCIPHER_CID }, michael@0: { NS_KEYMODULEOBJECT_CONTRACTID, &kNS_KEYMODULEOBJECT_CID }, michael@0: { NS_KEYMODULEOBJECTFACTORY_CONTRACTID, &kNS_KEYMODULEOBJECTFACTORY_CID }, michael@0: { NS_DATASIGNATUREVERIFIER_CONTRACTID, &kNS_DATASIGNATUREVERIFIER_CID }, michael@0: { NS_CERTOVERRIDE_CONTRACTID, &kNS_CERTOVERRIDE_CID }, michael@0: { NS_RANDOMGENERATOR_CONTRACTID, &kNS_RANDOMGENERATOR_CID }, michael@0: { nullptr } michael@0: }; michael@0: michael@0: static const mozilla::Module::CategoryEntry kNSSCategories[] = { michael@0: { NS_CONTENT_LISTENER_CATEGORYMANAGER_ENTRY, "application/x-x509-ca-cert", "@mozilla.org/uriloader/psm-external-content-listener;1" }, michael@0: { NS_CONTENT_LISTENER_CATEGORYMANAGER_ENTRY, "application/x-x509-server-cert", "@mozilla.org/uriloader/psm-external-content-listener;1" }, michael@0: { NS_CONTENT_LISTENER_CATEGORYMANAGER_ENTRY, "application/x-x509-user-cert", "@mozilla.org/uriloader/psm-external-content-listener;1" }, michael@0: { NS_CONTENT_LISTENER_CATEGORYMANAGER_ENTRY, "application/x-x509-email-cert", "@mozilla.org/uriloader/psm-external-content-listener;1" }, michael@0: { nullptr } michael@0: }; michael@0: michael@0: static const mozilla::Module kNSSModule = { michael@0: mozilla::Module::kVersion, michael@0: kNSSCIDs, michael@0: kNSSContracts, michael@0: kNSSCategories michael@0: }; michael@0: michael@0: } // unnamed namespace michael@0: michael@0: NSMODULE_DEFN(NSS) = &kNSSModule;