From 115fe9972e8591681ea2582cb54cfe03e73bf50d Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Mon, 4 Aug 2014 19:12:34 -0700 Subject: [PATCH] Bug 1053620: Replaces uses of PR_Abort with std::abort in mozilla::pkix, r=keeler --HG-- extra : rebase_source : 2e1f3eec5305e89bfa28fbda856b4e36515a2819 --- security/pkix/test/gtest/nssgtest.cpp | 4 ++-- security/pkix/test/gtest/pkixbuild_tests.cpp | 2 +- .../gtest/pkixocsp_VerifyEncodedOCSPResponse.cpp | 14 +++++++------- security/pkix/test/lib/pkixtestutil.cpp | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/security/pkix/test/gtest/nssgtest.cpp b/security/pkix/test/gtest/nssgtest.cpp index 2b663f1d15e..e44034ec12e 100644 --- a/security/pkix/test/gtest/nssgtest.cpp +++ b/security/pkix/test/gtest/nssgtest.cpp @@ -36,7 +36,7 @@ namespace mozilla { namespace pkix { namespace test { NSSTest::SetUpTestCase() { if (NSS_NoDB_Init(nullptr) != SECSuccess) { - PR_Abort(); + abort(); } now = Now(); @@ -49,7 +49,7 @@ NSSTest::NSSTest() : arena(PORT_NewArena(DER_DEFAULT_CHUNKSIZE)) { if (!arena) { - PR_Abort(); + abort(); } } diff --git a/security/pkix/test/gtest/pkixbuild_tests.cpp b/security/pkix/test/gtest/pkixbuild_tests.cpp index b669bd12d88..c5ee6dee80e 100644 --- a/security/pkix/test/gtest/pkixbuild_tests.cpp +++ b/security/pkix/test/gtest/pkixbuild_tests.cpp @@ -210,7 +210,7 @@ public: // 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(); } } diff --git a/security/pkix/test/gtest/pkixocsp_VerifyEncodedOCSPResponse.cpp b/security/pkix/test/gtest/pkixocsp_VerifyEncodedOCSPResponse.cpp index e3bdfebfa6c..e1179a2de28 100644 --- a/security/pkix/test/gtest/pkixocsp_VerifyEncodedOCSPResponse.cpp +++ b/security/pkix/test/gtest/pkixocsp_VerifyEncodedOCSPResponse.cpp @@ -123,7 +123,7 @@ public: { NSSTest::SetUpTestCase(); if (!SetUpTestCaseInner()) { - PR_Abort(); + abort(); } } @@ -135,7 +135,7 @@ public: // The result of ASCIIToDERName is owned by the arena if (InitInputFromSECItem(ASCIIToDERName(arena.get(), rootName), rootNameDER) != Success) { - PR_Abort(); + abort(); } Input serialNumberDER; @@ -143,17 +143,17 @@ public: 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(); } } @@ -807,11 +807,11 @@ public: "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(); } } diff --git a/security/pkix/test/lib/pkixtestutil.cpp b/security/pkix/test/lib/pkixtestutil.cpp index feb1e223b8a..6b16fbb46f9 100644 --- a/security/pkix/test/lib/pkixtestutil.cpp +++ b/security/pkix/test/lib/pkixtestutil.cpp @@ -223,7 +223,7 @@ private: break; default: PR_NOT_REACHED("EncodeLength: bad lengthLength"); - PR_Abort(); + abort(); } } @@ -293,7 +293,7 @@ HashAlgorithmToLength(SECOidTag hashAlg) return SHA512_LENGTH; default: PR_NOT_REACHED("HashAlgorithmToLength: bad hashAlg"); - PR_Abort(); + abort(); } return 0; } @@ -1416,7 +1416,7 @@ CertStatus(OCSPResponseContext& context) } default: PR_NOT_REACHED("CertStatus: bad context.certStatus"); - PR_Abort(); + abort(); } return nullptr; }