Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
Backed out changeset 7ec471c99263 (bug 1219482) to hopefully fix the …
Browse files Browse the repository at this point in the history
…intermittent hazard failures CLOSED TREE
  • Loading branch information
KWierso committed Jan 29, 2016
1 parent 8d5fcc4 commit 48dd121
Show file tree
Hide file tree
Showing 27 changed files with 68 additions and 31 deletions.
2 changes: 1 addition & 1 deletion security/apps/AppSignatureVerification.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ using namespace mozilla::pkix;
using namespace mozilla;
using namespace mozilla::psm;

extern mozilla::LazyLogModule gPIPNSSLog;
extern PRLogModuleInfo* gPIPNSSLog;

namespace {

Expand Down
2 changes: 1 addition & 1 deletion security/apps/AppTrustDomain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

using namespace mozilla::pkix;

extern mozilla::LazyLogModule gPIPNSSLog;
extern PRLogModuleInfo* gPIPNSSLog;

static const unsigned int DEFAULT_MIN_RSA_BITS = 2048;
static char kDevImportedDER[] =
Expand Down
5 changes: 4 additions & 1 deletion security/certverifier/CertVerifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
using namespace mozilla::pkix;
using namespace mozilla::psm;

mozilla::LazyLogModule gCertVerifierLog("certverifier");
PRLogModuleInfo* gCertVerifierLog = nullptr;

namespace mozilla { namespace psm {

Expand Down Expand Up @@ -52,6 +52,9 @@ CertVerifier::~CertVerifier()
void
InitCertVerifierLog()
{
if (!gCertVerifierLog) {
gCertVerifierLog = PR_NewLogModule("certverifier");
}
}

Result
Expand Down
2 changes: 1 addition & 1 deletion security/certverifier/ExtendedValidation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "prerror.h"
#include "prinit.h"

extern mozilla::LazyLogModule gPIPNSSLog;
extern PRLogModuleInfo* gPIPNSSLog;

#define CONST_OID static const unsigned char
#define OI(x) { siDEROID, (unsigned char*) x, sizeof x }
Expand Down
2 changes: 1 addition & 1 deletion security/certverifier/NSSCertDBTrustDomain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
using namespace mozilla;
using namespace mozilla::pkix;

extern LazyLogModule gCertVerifierLog;
extern PRLogModuleInfo* gCertVerifierLog;

static const uint64_t ServerFailureDelaySeconds = 5 * 60;

Expand Down
2 changes: 1 addition & 1 deletion security/certverifier/OCSPCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include "ScopedNSSTypes.h"
#include "secerr.h"

extern mozilla::LazyLogModule gCertVerifierLog;
extern PRLogModuleInfo* gCertVerifierLog;

using namespace mozilla::pkix;

Expand Down
2 changes: 1 addition & 1 deletion security/certverifier/OCSPRequestor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "nsServiceManagerUtils.h"
#include "secerr.h"

extern mozilla::LazyLogModule gCertVerifierLog;
extern PRLogModuleInfo* gCertVerifierLog;

namespace mozilla {

Expand Down
5 changes: 4 additions & 1 deletion security/manager/ssl/CertBlocklist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 LazyLogModule gCertBlockPRLog("CertBlock");
static PRLogModuleInfo* gCertBlockPRLog;

uint32_t CertBlocklist::sLastBlocklistUpdate = 0U;
uint32_t CertBlocklist::sLastKintoUpdate = 0U;
Expand Down Expand Up @@ -130,6 +130,9 @@ CertBlocklist::CertBlocklist()
, mBackingFileIsInitialized(false)
, mBackingFile(nullptr)
{
if (!gCertBlockPRLog) {
gCertBlockPRLog = PR_NewLogModule("CertBlock");
}
}

CertBlocklist::~CertBlocklist()
Expand Down
2 changes: 1 addition & 1 deletion security/manager/ssl/PSMContentListener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

#include "mozilla/Logging.h"

extern mozilla::LazyLogModule gPIPNSSLog;
extern PRLogModuleInfo* gPIPNSSLog;

namespace mozilla { namespace psm {

Expand Down
3 changes: 2 additions & 1 deletion security/manager/ssl/PublicKeyPinningService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ using namespace mozilla;
using namespace mozilla::pkix;
using namespace mozilla::psm;

LazyLogModule gPublicKeyPinningLog("PublicKeyPinningService");
PRLogModuleInfo* gPublicKeyPinningLog =
PR_NewLogModule("PublicKeyPinningService");

/**
Computes in the location specified by base64Out the SHA256 digest
Expand Down
3 changes: 2 additions & 1 deletion security/manager/ssl/RootCertificateTelemetryUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@

namespace mozilla { namespace psm {

mozilla::LazyLogModule gPublicKeyPinningTelemetryLog("PublicKeyPinningTelemetryService");
PRLogModuleInfo* gPublicKeyPinningTelemetryLog =
PR_NewLogModule("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.
Expand Down
2 changes: 1 addition & 1 deletion security/manager/ssl/SSLServerCertVerification.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
#include "secport.h"
#include "sslerr.h"

extern mozilla::LazyLogModule gPIPNSSLog;
extern PRLogModuleInfo* gPIPNSSLog;

using namespace mozilla::pkix;

Expand Down
2 changes: 1 addition & 1 deletion security/manager/ssl/nsCertTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

using namespace mozilla;

extern LazyLogModule gPIPNSSLog;
extern PRLogModuleInfo* gPIPNSSLog;

static NS_DEFINE_CID(kCertOverrideCID, NS_CERTOVERRIDE_CID);

Expand Down
2 changes: 1 addition & 1 deletion security/manager/ssl/nsNSSCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
using namespace mozilla;
using namespace mozilla::psm;

extern LazyLogModule gPIPNSSLog;
extern PRLogModuleInfo* gPIPNSSLog;

static void AccumulateCipherSuite(Telemetry::ID probe,
const SSLChannelInfo& channelInfo);
Expand Down
2 changes: 1 addition & 1 deletion security/manager/ssl/nsNSSCertificate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
using namespace mozilla;
using namespace mozilla::psm;

extern LazyLogModule gPIPNSSLog;
extern PRLogModuleInfo* gPIPNSSLog;

// This is being stored in an uint32_t that can otherwise
// only take values from nsIX509Cert's list of cert types.
Expand Down
2 changes: 1 addition & 1 deletion security/manager/ssl/nsNSSCertificateDB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ using namespace mozilla;
using namespace mozilla::psm;
using mozilla::psm::SharedSSLState;

extern LazyLogModule gPIPNSSLog;
extern PRLogModuleInfo* gPIPNSSLog;

static nsresult
attemptToLogInWithDefaultPassword()
Expand Down
4 changes: 3 additions & 1 deletion security/manager/ssl/nsNSSComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
using namespace mozilla;
using namespace mozilla::psm;

LazyLogModule gPIPNSSLog("pipnss");
PRLogModuleInfo* gPIPNSSLog = nullptr;

int nsNSSComponent::mInstanceCount = 0;

Expand Down Expand Up @@ -221,6 +221,8 @@ 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!");
Expand Down
2 changes: 1 addition & 1 deletion security/manager/ssl/nsNSSIOLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ static const bool FALSE_START_REQUIRE_NPN_DEFAULT = false;

} // unnamed namespace

extern LazyLogModule gPIPNSSLog;
extern PRLogModuleInfo* gPIPNSSLog;

nsNSSSocketInfo::nsNSSSocketInfo(SharedSSLState& aState, uint32_t providerFlags)
: mFd(nullptr),
Expand Down
2 changes: 1 addition & 1 deletion security/manager/ssl/nsNSSShutDown.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

using namespace mozilla;

extern LazyLogModule gPIPNSSLog;
extern PRLogModuleInfo* gPIPNSSLog;

struct ObjectHashEntry : PLDHashEntryHdr {
nsNSSShutDownObject *obj;
Expand Down
14 changes: 11 additions & 3 deletions security/manager/ssl/nsNTLMAuthModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,18 @@
#include "prsystem.h"

static bool sNTLMv1Forced = false;
static mozilla::LazyLogModule sNTLMLog("NTLM");

#define LOG(x) MOZ_LOG(sNTLMLog, mozilla::LogLevel::Debug, x)
#define LOG_ENABLED() MOZ_LOG_TEST(sNTLMLog, mozilla::LogLevel::Debug)
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)

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);
Expand Down
2 changes: 1 addition & 1 deletion security/manager/ssl/nsPK11TokenDB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#include "nsPK11TokenDB.h"

extern mozilla::LazyLogModule gPIPNSSLog;
extern PRLogModuleInfo* gPIPNSSLog;

NS_IMPL_ISUPPORTS(nsPK11Token, nsIPK11Token)

Expand Down
2 changes: 1 addition & 1 deletion security/manager/ssl/nsPKCS11Slot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

using mozilla::LogLevel;

extern mozilla::LazyLogModule gPIPNSSLog;
extern PRLogModuleInfo* gPIPNSSLog;

NS_IMPL_ISUPPORTS(nsPKCS11Slot, nsIPKCS11Slot)

Expand Down
3 changes: 2 additions & 1 deletion security/manager/ssl/nsPKCS12Blob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@

#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
Expand Down
5 changes: 4 additions & 1 deletion security/manager/ssl/nsSecureBrowserUIImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ using namespace mozilla;
// this enables LogLevel::Debug level information and places all output in
// the file nspr.log
//
LazyLogModule gSecureDocLog("nsSecureBrowserUI");
PRLogModuleInfo* gSecureDocLog = nullptr;

struct RequestHashEntry : PLDHashEntryHdr {
void *r;
Expand Down Expand Up @@ -117,6 +117,9 @@ nsSecureBrowserUIImpl::nsSecureBrowserUIImpl()
MOZ_ASSERT(NS_IsMainThread());

ResetStateTracking();

if (!gSecureDocLog)
gSecureDocLog = PR_NewLogModule("nsSecureBrowserUI");
}

NS_IMPL_ISUPPORTS(nsSecureBrowserUIImpl,
Expand Down
12 changes: 10 additions & 2 deletions security/manager/ssl/nsSecurityHeaderParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,17 @@ IsQuotedPairSymbol(signed char chr) {
return (chr >= 0);
}

static mozilla::LazyLogModule sSHParserLog("nsSecurityHeaderParser");
static PRLogModuleInfo *
GetSHParserLog()
{
static PRLogModuleInfo *sSHParserLog;
if (!sSHParserLog) {
sSHParserLog = PR_NewLogModule("nsSecurityHeaderParser");
}
return sSHParserLog;
}

#define SHPARSERLOG(args) MOZ_LOG(sSHParserLog, mozilla::LogLevel::Debug, args)
#define SHPARSERLOG(args) MOZ_LOG(GetSHParserLog(), mozilla::LogLevel::Debug, args)

nsSecurityHeaderParser::nsSecurityHeaderParser(const char *aHeader)
: mCursor(aHeader)
Expand Down
11 changes: 9 additions & 2 deletions security/manager/ssl/nsSiteSecurityService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,16 @@
using namespace mozilla;
using namespace mozilla::psm;

static LazyLogModule gSSSLog("nsSSService");
static PRLogModuleInfo *
GetSSSLog()
{
static PRLogModuleInfo *gSSSLog;
if (!gSSSLog)
gSSSLog = PR_NewLogModule("nsSSService");
return gSSSLog;
}

#define SSSLOG(args) MOZ_LOG(gSSSLog, mozilla::LogLevel::Debug, args)
#define SSSLOG(args) MOZ_LOG(GetSSSLog(), mozilla::LogLevel::Debug, args)

////////////////////////////////////////////////////////////////////////////////

Expand Down
2 changes: 1 addition & 1 deletion security/manager/ssl/nsUsageArrayHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
using namespace mozilla;
using namespace mozilla::psm;

extern LazyLogModule gPIPNSSLog;
extern PRLogModuleInfo* gPIPNSSLog;

static NS_DEFINE_CID(kNSSComponentCID, NS_NSSCOMPONENT_CID); // XXX? needed?::

Expand Down

0 comments on commit 48dd121

Please sign in to comment.