mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 1219482 - Replace PRLogModuleInfo with LazyLogModule in security subdirectory. r=froydnj
--HG-- extra : rebase_source : 7aed4d8669dccd1270a88a0cacfa254e3b9f5950
This commit is contained in:
parent
6fdb9b782e
commit
1b0525a9d3
@ -40,7 +40,7 @@ using namespace mozilla::pkix;
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::psm;
|
||||
|
||||
extern PRLogModuleInfo* gPIPNSSLog;
|
||||
extern mozilla::LazyLogModule gPIPNSSLog;
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
||||
|
||||
using namespace mozilla::pkix;
|
||||
|
||||
extern PRLogModuleInfo* gPIPNSSLog;
|
||||
extern mozilla::LazyLogModule gPIPNSSLog;
|
||||
|
||||
static const unsigned int DEFAULT_MIN_RSA_BITS = 2048;
|
||||
static char kDevImportedDER[] =
|
||||
|
@ -22,7 +22,7 @@
|
||||
using namespace mozilla::pkix;
|
||||
using namespace mozilla::psm;
|
||||
|
||||
PRLogModuleInfo* gCertVerifierLog = nullptr;
|
||||
mozilla::LazyLogModule gCertVerifierLog("certverifier");
|
||||
|
||||
namespace mozilla { namespace psm {
|
||||
|
||||
@ -52,9 +52,6 @@ CertVerifier::~CertVerifier()
|
||||
void
|
||||
InitCertVerifierLog()
|
||||
{
|
||||
if (!gCertVerifierLog) {
|
||||
gCertVerifierLog = PR_NewLogModule("certverifier");
|
||||
}
|
||||
}
|
||||
|
||||
Result
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include "prerror.h"
|
||||
#include "prinit.h"
|
||||
|
||||
extern PRLogModuleInfo* gPIPNSSLog;
|
||||
extern mozilla::LazyLogModule gPIPNSSLog;
|
||||
|
||||
#define CONST_OID static const unsigned char
|
||||
#define OI(x) { siDEROID, (unsigned char*) x, sizeof x }
|
||||
|
@ -33,7 +33,7 @@
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::pkix;
|
||||
|
||||
extern PRLogModuleInfo* gCertVerifierLog;
|
||||
extern LazyLogModule gCertVerifierLog;
|
||||
|
||||
static const uint64_t ServerFailureDelaySeconds = 5 * 60;
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include "ScopedNSSTypes.h"
|
||||
#include "secerr.h"
|
||||
|
||||
extern PRLogModuleInfo* gCertVerifierLog;
|
||||
extern mozilla::LazyLogModule gCertVerifierLog;
|
||||
|
||||
using namespace mozilla::pkix;
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include "nsServiceManagerUtils.h"
|
||||
#include "secerr.h"
|
||||
|
||||
extern PRLogModuleInfo* gCertVerifierLog;
|
||||
extern mozilla::LazyLogModule gCertVerifierLog;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
@ -34,7 +34,7 @@ using namespace mozilla::pkix;
|
||||
#define PREF_MAX_STALENESS_IN_SECONDS "security.onecrl.maximum_staleness_in_seconds"
|
||||
#define PREF_ONECRL_VIA_AMO "security.onecrl.via.amo"
|
||||
|
||||
static PRLogModuleInfo* gCertBlockPRLog;
|
||||
static LazyLogModule gCertBlockPRLog("CertBlock");
|
||||
|
||||
uint32_t CertBlocklist::sLastBlocklistUpdate = 0U;
|
||||
uint32_t CertBlocklist::sLastKintoUpdate = 0U;
|
||||
@ -130,9 +130,6 @@ CertBlocklist::CertBlocklist()
|
||||
, mBackingFileIsInitialized(false)
|
||||
, mBackingFile(nullptr)
|
||||
{
|
||||
if (!gCertBlockPRLog) {
|
||||
gCertBlockPRLog = PR_NewLogModule("CertBlock");
|
||||
}
|
||||
}
|
||||
|
||||
CertBlocklist::~CertBlocklist()
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
#include "mozilla/Logging.h"
|
||||
|
||||
extern PRLogModuleInfo* gPIPNSSLog;
|
||||
extern mozilla::LazyLogModule gPIPNSSLog;
|
||||
|
||||
namespace mozilla { namespace psm {
|
||||
|
||||
|
@ -23,8 +23,7 @@ using namespace mozilla;
|
||||
using namespace mozilla::pkix;
|
||||
using namespace mozilla::psm;
|
||||
|
||||
PRLogModuleInfo* gPublicKeyPinningLog =
|
||||
PR_NewLogModule("PublicKeyPinningService");
|
||||
LazyLogModule gPublicKeyPinningLog("PublicKeyPinningService");
|
||||
|
||||
/**
|
||||
Computes in the location specified by base64Out the SHA256 digest
|
||||
|
@ -13,8 +13,7 @@
|
||||
|
||||
namespace mozilla { namespace psm {
|
||||
|
||||
PRLogModuleInfo* gPublicKeyPinningTelemetryLog =
|
||||
PR_NewLogModule("PublicKeyPinningTelemetryService");
|
||||
mozilla::LazyLogModule gPublicKeyPinningTelemetryLog("PublicKeyPinningTelemetryService");
|
||||
|
||||
// Used in the BinarySearch method, this does a memcmp between the pointer
|
||||
// provided to its construtor and whatever the binary search is looking for.
|
||||
|
@ -133,7 +133,7 @@
|
||||
#include "secport.h"
|
||||
#include "sslerr.h"
|
||||
|
||||
extern PRLogModuleInfo* gPIPNSSLog;
|
||||
extern mozilla::LazyLogModule gPIPNSSLog;
|
||||
|
||||
using namespace mozilla::pkix;
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
extern PRLogModuleInfo* gPIPNSSLog;
|
||||
extern LazyLogModule gPIPNSSLog;
|
||||
|
||||
static NS_DEFINE_CID(kCertOverrideCID, NS_CERTOVERRIDE_CID);
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::psm;
|
||||
|
||||
extern PRLogModuleInfo* gPIPNSSLog;
|
||||
extern LazyLogModule gPIPNSSLog;
|
||||
|
||||
static void AccumulateCipherSuite(Telemetry::ID probe,
|
||||
const SSLChannelInfo& channelInfo);
|
||||
|
@ -57,7 +57,7 @@
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::psm;
|
||||
|
||||
extern PRLogModuleInfo* gPIPNSSLog;
|
||||
extern LazyLogModule gPIPNSSLog;
|
||||
|
||||
// This is being stored in an uint32_t that can otherwise
|
||||
// only take values from nsIX509Cert's list of cert types.
|
||||
|
@ -56,7 +56,7 @@ using namespace mozilla;
|
||||
using namespace mozilla::psm;
|
||||
using mozilla::psm::SharedSSLState;
|
||||
|
||||
extern PRLogModuleInfo* gPIPNSSLog;
|
||||
extern LazyLogModule gPIPNSSLog;
|
||||
|
||||
static nsresult
|
||||
attemptToLogInWithDefaultPassword()
|
||||
|
@ -55,7 +55,7 @@
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::psm;
|
||||
|
||||
PRLogModuleInfo* gPIPNSSLog = nullptr;
|
||||
LazyLogModule gPIPNSSLog("pipnss");
|
||||
|
||||
int nsNSSComponent::mInstanceCount = 0;
|
||||
|
||||
@ -221,8 +221,6 @@ nsNSSComponent::nsNSSComponent()
|
||||
#endif
|
||||
mCertVerificationThread(nullptr)
|
||||
{
|
||||
if (!gPIPNSSLog)
|
||||
gPIPNSSLog = PR_NewLogModule("pipnss");
|
||||
MOZ_LOG(gPIPNSSLog, LogLevel::Debug, ("nsNSSComponent::ctor\n"));
|
||||
|
||||
NS_ASSERTION( (0 == mInstanceCount), "nsNSSComponent is a singleton, but instantiated multiple times!");
|
||||
|
@ -82,7 +82,7 @@ static const bool FALSE_START_REQUIRE_NPN_DEFAULT = false;
|
||||
|
||||
} // unnamed namespace
|
||||
|
||||
extern PRLogModuleInfo* gPIPNSSLog;
|
||||
extern LazyLogModule gPIPNSSLog;
|
||||
|
||||
nsNSSSocketInfo::nsNSSSocketInfo(SharedSSLState& aState, uint32_t providerFlags)
|
||||
: mFd(nullptr),
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
extern PRLogModuleInfo* gPIPNSSLog;
|
||||
extern LazyLogModule gPIPNSSLog;
|
||||
|
||||
struct ObjectHashEntry : PLDHashEntryHdr {
|
||||
nsNSSShutDownObject *obj;
|
||||
|
@ -28,18 +28,10 @@
|
||||
#include "prsystem.h"
|
||||
|
||||
static bool sNTLMv1Forced = false;
|
||||
static mozilla::LazyLogModule sNTLMLog("NTLM");
|
||||
|
||||
static PRLogModuleInfo *
|
||||
GetNTLMLog()
|
||||
{
|
||||
static PRLogModuleInfo *sNTLMLog;
|
||||
if (!sNTLMLog)
|
||||
sNTLMLog = PR_NewLogModule("NTLM");
|
||||
return sNTLMLog;
|
||||
}
|
||||
|
||||
#define LOG(x) MOZ_LOG(GetNTLMLog(), mozilla::LogLevel::Debug, x)
|
||||
#define LOG_ENABLED() MOZ_LOG_TEST(GetNTLMLog(), mozilla::LogLevel::Debug)
|
||||
#define LOG(x) MOZ_LOG(sNTLMLog, mozilla::LogLevel::Debug, x)
|
||||
#define LOG_ENABLED() MOZ_LOG_TEST(sNTLMLog, mozilla::LogLevel::Debug)
|
||||
|
||||
static void des_makekey(const uint8_t *raw, uint8_t *key);
|
||||
static void des_encrypt(const uint8_t *key, const uint8_t *src, uint8_t *hash);
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include "nsPK11TokenDB.h"
|
||||
|
||||
extern PRLogModuleInfo* gPIPNSSLog;
|
||||
extern mozilla::LazyLogModule gPIPNSSLog;
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsPK11Token, nsIPK11Token)
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
using mozilla::LogLevel;
|
||||
|
||||
extern PRLogModuleInfo* gPIPNSSLog;
|
||||
extern mozilla::LazyLogModule gPIPNSSLog;
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsPKCS11Slot, nsIPKCS11Slot)
|
||||
|
||||
|
@ -32,9 +32,8 @@
|
||||
|
||||
#include "secerr.h"
|
||||
|
||||
extern PRLogModuleInfo* gPIPNSSLog;
|
||||
|
||||
using namespace mozilla;
|
||||
extern LazyLogModule gPIPNSSLog;
|
||||
|
||||
#define PIP_PKCS12_TMPFILENAME NS_LITERAL_CSTRING(".pip_p12tmp")
|
||||
#define PIP_PKCS12_BUFFER_SIZE 2048
|
||||
|
@ -49,7 +49,7 @@ using namespace mozilla;
|
||||
// this enables LogLevel::Debug level information and places all output in
|
||||
// the file nspr.log
|
||||
//
|
||||
PRLogModuleInfo* gSecureDocLog = nullptr;
|
||||
LazyLogModule gSecureDocLog("nsSecureBrowserUI");
|
||||
|
||||
struct RequestHashEntry : PLDHashEntryHdr {
|
||||
void *r;
|
||||
@ -117,9 +117,6 @@ nsSecureBrowserUIImpl::nsSecureBrowserUIImpl()
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
ResetStateTracking();
|
||||
|
||||
if (!gSecureDocLog)
|
||||
gSecureDocLog = PR_NewLogModule("nsSecureBrowserUI");
|
||||
}
|
||||
|
||||
NS_IMPL_ISUPPORTS(nsSecureBrowserUIImpl,
|
||||
|
@ -46,17 +46,9 @@ IsQuotedPairSymbol(signed char chr) {
|
||||
return (chr >= 0);
|
||||
}
|
||||
|
||||
static PRLogModuleInfo *
|
||||
GetSHParserLog()
|
||||
{
|
||||
static PRLogModuleInfo *sSHParserLog;
|
||||
if (!sSHParserLog) {
|
||||
sSHParserLog = PR_NewLogModule("nsSecurityHeaderParser");
|
||||
}
|
||||
return sSHParserLog;
|
||||
}
|
||||
static mozilla::LazyLogModule sSHParserLog("nsSecurityHeaderParser");
|
||||
|
||||
#define SHPARSERLOG(args) MOZ_LOG(GetSHParserLog(), mozilla::LogLevel::Debug, args)
|
||||
#define SHPARSERLOG(args) MOZ_LOG(sSHParserLog, mozilla::LogLevel::Debug, args)
|
||||
|
||||
nsSecurityHeaderParser::nsSecurityHeaderParser(const char *aHeader)
|
||||
: mCursor(aHeader)
|
||||
|
@ -41,16 +41,9 @@
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::psm;
|
||||
|
||||
static PRLogModuleInfo *
|
||||
GetSSSLog()
|
||||
{
|
||||
static PRLogModuleInfo *gSSSLog;
|
||||
if (!gSSSLog)
|
||||
gSSSLog = PR_NewLogModule("nsSSService");
|
||||
return gSSSLog;
|
||||
}
|
||||
static LazyLogModule gSSSLog("nsSSService");
|
||||
|
||||
#define SSSLOG(args) MOZ_LOG(GetSSSLog(), mozilla::LogLevel::Debug, args)
|
||||
#define SSSLOG(args) MOZ_LOG(gSSSLog, mozilla::LogLevel::Debug, args)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::psm;
|
||||
|
||||
extern PRLogModuleInfo* gPIPNSSLog;
|
||||
extern LazyLogModule gPIPNSSLog;
|
||||
|
||||
static NS_DEFINE_CID(kNSSComponentCID, NS_NSSCOMPONENT_CID); // XXX? needed?::
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user