From 21e39a16860477013a545d7b80ffeb4bbe807b21 Mon Sep 17 00:00:00 2001 From: Kai Engert Date: Sat, 16 Feb 2008 05:38:51 +0000 Subject: [PATCH] - Apply upstream patch for bug 417664, enable test suite on pcc. --- bug417664.patch | 56 +++++++++++++++++++++++++++++++++++++++++++++++++ nss.spec | 12 +++++------ 2 files changed, 61 insertions(+), 7 deletions(-) create mode 100644 bug417664.patch diff --git a/bug417664.patch b/bug417664.patch new file mode 100644 index 0000000..87c88eb --- /dev/null +++ b/bug417664.patch @@ -0,0 +1,56 @@ +Index: mozilla/security/nss/lib/libpkix/pkix/top/pkix_defaultcrlchecker.c +=================================================================== +RCS file: /cvsroot/mozilla/security/nss/lib/libpkix/pkix/top/pkix_defaultcrlchecker.c,v +retrieving revision 1.6 +diff -u -u -r1.6 pkix_defaultcrlchecker.c +--- mozilla/security/nss/lib/libpkix/pkix/top/pkix_defaultcrlchecker.c 6 Dec 2007 18:15:10 -0000 1.6 ++++ mozilla/security/nss/lib/libpkix/pkix/top/pkix_defaultcrlchecker.c 16 Feb 2008 05:36:03 -0000 +@@ -58,6 +58,9 @@ + "Certificate is revoked by CRL for aACompromise", + }; + ++static const int numReasonCodes = ++ sizeof(reasonCodeMsgString) / sizeof(reasonCodeMsgString[0]); ++ + /* --Private-DefaultCRLCheckerState-Functions------------------------------- */ + + /* +@@ -433,8 +436,9 @@ + + /* Set reason code in state for advance CRL reviewing */ + +- if (reasonCode >= 0 && +- reasonCode < sizeof (reasonCodeMsgString)) { ++ if (reasonCode >= 0) { ++ if (reasonCode >= numReasonCodes) ++ reasonCode = 0; + + state->reasonCodeMask |= 1 << reasonCode; + PKIX_DEFAULTCRLCHECKERSTATE_DEBUG_ARG +@@ -726,12 +730,13 @@ + (crlEntry, &reasonCode, plContext), + PKIX_CRLENTRYGETCRLENTRYREASONCODEFAILED); + +- if ((reasonCode >= 0) && +- (reasonCode < sizeof (reasonCodeMsgString))) { ++ if (reasonCode >= 0) { ++ if (reasonCode >= numReasonCodes) ++ reasonCode = 0; + +- allReasonCodes |= (1 << (reasonCode - 1)); ++ allReasonCodes |= (1 << reasonCode); + +- PKIX_DEFAULTCRLCHECKERSTATE_DEBUG_ARG ++ PKIX_DEFAULTCRLCHECKERSTATE_DEBUG_ARG + ("CRL revocation Reason: %s\n ", + reasonCodeMsgString[reasonCode]); + +@@ -991,7 +996,7 @@ + PKIX_PL_PublicKey *newPublicKey = NULL; + PKIX_Error *checkKeyUsageFail = NULL; + PKIX_Boolean selfIssued = PKIX_FALSE; +- void *nbioContext = PKIX_FALSE; ++ void *nbioContext = NULL; + + PKIX_ENTER(CERTCHAINCHECKER, "pkix_DefaultCRLChecker_Check"); + PKIX_NULLCHECK_THREE(checker, cert, pNBIOContext); diff --git a/nss.spec b/nss.spec index 4324acf..1601df5 100644 --- a/nss.spec +++ b/nss.spec @@ -4,7 +4,7 @@ Summary: Network Security Services Name: nss Version: 3.11.99.3 -Release: 5%{?dist} +Release: 6%{?dist} License: MPLv1.1 or GPLv2+ or LGPLv2+ URL: http://www.mozilla.org/projects/security/pki/nss/ Group: System Environment/Libraries @@ -34,6 +34,7 @@ Patch1: nss-no-rpath.patch Patch2: nss-nolocalsql.patch Patch6: nss-enable-pem.patch Patch7: bug432146.patch +Patch8: bug417664.patch %description @@ -90,6 +91,7 @@ low level services. %patch2 -p0 %patch6 -p0 -b .libpem %patch7 -p0 +%patch8 -p0 %build @@ -162,9 +164,6 @@ chmod 755 $RPM_BUILD_ROOT/%{_bindir}/nss-config # enable the following line to force a test failure # find ./mozilla -name \*.chk | xargs rm -f -### test suite fails on ppc64 and ppc, temporarily disable -%ifnarch ppc64 ppc - # Run test suite. # In order to support multiple concurrent executions of the test suite # (caused by concurrent RPM builds) on a single host, @@ -212,9 +211,6 @@ if [ $TEST_FAILURES -ne 0 ]; then fi echo "test suite completed" -### end of ifnarch for test suite -%endif - %install @@ -435,6 +431,8 @@ done %changelog +* Sat Feb 16 2008 Kai Engert - 3.11.99.3-6 +- Apply upstream patch for bug 417664, enable test suite on pcc. * Fri Feb 15 2008 Kai Engert - 3.11.99.3-5 - Support concurrent runs of the test suite on a single build host. * Thu Feb 14 2008 Kai Engert - 3.11.99.3-4