Skip to content

Commit

Permalink
Bug 1053620: Replaces uses of PR_Abort with std::abort in mozilla::pk…
Browse files Browse the repository at this point in the history
…ix, r=keeler

--HG--
extra : rebase_source : 2e1f3eec5305e89bfa28fbda856b4e36515a2819
  • Loading branch information
briansmith committed Aug 5, 2014
1 parent d08286d commit 1709415
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions security/pkix/test/gtest/nssgtest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace mozilla { namespace pkix { namespace test {
NSSTest::SetUpTestCase()
{
if (NSS_NoDB_Init(nullptr) != SECSuccess) {
PR_Abort();
abort();
}

now = Now();
Expand All @@ -49,7 +49,7 @@ NSSTest::NSSTest()
: arena(PORT_NewArena(DER_DEFAULT_CHUNKSIZE))
{
if (!arena) {
PR_Abort();
abort();
}
}

Expand Down
2 changes: 1 addition & 1 deletion security/pkix/test/gtest/pkixbuild_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ class pkixbuild : public NSSTest
// Initialize the tail of the cert chains we'll be using once, to make the
// tests run faster (generating the keys is slow).
if (!trustDomain.SetUpCertChainTail()) {
PR_Abort();
abort();
}
}

Expand Down
14 changes: 7 additions & 7 deletions security/pkix/test/gtest/pkixocsp_VerifyEncodedOCSPResponse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class pkixocsp_VerifyEncodedResponse : public NSSTest
{
NSSTest::SetUpTestCase();
if (!SetUpTestCaseInner()) {
PR_Abort();
abort();
}
}

Expand All @@ -135,25 +135,25 @@ class pkixocsp_VerifyEncodedResponse : public NSSTest
// The result of ASCIIToDERName is owned by the arena
if (InitInputFromSECItem(ASCIIToDERName(arena.get(), rootName),
rootNameDER) != Success) {
PR_Abort();
abort();
}

Input serialNumberDER;
// The result of CreateEncodedSerialNumber is owned by the arena
if (InitInputFromSECItem(
CreateEncodedSerialNumber(arena.get(), ++rootIssuedCount),
serialNumberDER) != Success) {
PR_Abort();
abort();
}

Input rootSPKIDER;
if (InitInputFromSECItem(rootSPKI.get(), rootSPKIDER) != Success) {
PR_Abort();
abort();
}
endEntityCertID = new (std::nothrow) CertID(rootNameDER, rootSPKIDER,
serialNumberDER);
if (!endEntityCertID) {
PR_Abort();
abort();
}
}

Expand Down Expand Up @@ -807,11 +807,11 @@ class pkixocsp_VerifyEncodedResponse_GetCertTrust
"CN=OCSPGetCertTrustTest Signer", OCSPResponseContext::good,
byKey, SEC_OID_OCSP_RESPONDER, &signerCertDER));
if (response.Init(createdResponse) != Success) {
PR_Abort();
abort();
}

if (response.GetLength() == 0 || signerCertDER.GetLength() == 0) {
PR_Abort();
abort();
}
}

Expand Down
6 changes: 3 additions & 3 deletions security/pkix/test/lib/pkixtestutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ class Output
break;
default:
PR_NOT_REACHED("EncodeLength: bad lengthLength");
PR_Abort();
abort();
}
}

Expand Down Expand Up @@ -293,7 +293,7 @@ HashAlgorithmToLength(SECOidTag hashAlg)
return SHA512_LENGTH;
default:
PR_NOT_REACHED("HashAlgorithmToLength: bad hashAlg");
PR_Abort();
abort();
}
return 0;
}
Expand Down Expand Up @@ -1416,7 +1416,7 @@ CertStatus(OCSPResponseContext& context)
}
default:
PR_NOT_REACHED("CertStatus: bad context.certStatus");
PR_Abort();
abort();
}
return nullptr;
}
Expand Down

0 comments on commit 1709415

Please sign in to comment.