~ubuntu-branches/ubuntu/raring/nss/raring-security

« back to all changes in this revision

Viewing changes to mozilla/security/nss/lib/libpkix/pkix/util/pkix_tools.c

  • Committer: Bazaar Package Importer
  • Author(s): Chris Coulson
  • Date: 2010-03-25 13:46:06 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20100325134606-bl6liuok2w9l7snv
Tags: 3.12.6-0ubuntu1
* New upstream release 3.12.6 RTM (NSS_3_12_6_RTM)
  - fixes CVE-2009-3555 aka US-CERT VU#120541
* Adjust patches to changed upstream code base
  - update debian/patches/38_kbsd.patch
  - update debian/patches/38_mips64_build.patch
  - update debian/patches/85_security_load.patch
* Remove patches that are merged upstream
  - delete debian/patches/91_nonexec_stack.patch
  - update debian/patches/series
* Bump nspr dependency to 4.8
  - update debian/control
* Add new symbols for 3.12.6
  - update debian/libnss3-1d.symbols

Show diffs side-by-side

added added

removed removed

Lines of Context:
395
395
        PKIX_UInt32 hash;
396
396
 
397
397
        PKIX_ENTER(OBJECT, "pkix_hash");
398
 
        PKIX_NULLCHECK_TWO(bytes, pHash);
 
398
        if (length != 0) {
 
399
                PKIX_NULLCHECK_ONE(bytes);
 
400
        }
 
401
        PKIX_NULLCHECK_ONE(pHash);
399
402
 
400
403
        hash = 0;
401
404
        for (i = 0; i < length; i++) {
968
971
        PKIX_PL_Date *cacheValidUntilDate = NULL;
969
972
        PKIX_CertSelector *certSel = NULL;
970
973
        PKIX_Error *cachedCertError = NULL;
 
974
        PKIX_Error *selectorError = NULL;
971
975
        PKIX_CertSelector_MatchCallback selectorMatch = NULL;
972
976
        PKIX_Int32 cmpValidTimeResult = PKIX_FALSE;
973
977
        PKIX_Int32 cmpCacheTimeResult = 0;
974
 
        PKIX_Boolean certMatch = PKIX_FALSE;
975
978
        PKIX_UInt32 numItems = 0;
976
979
        PKIX_UInt32 i;
977
980
 
1095
1098
                            goto cleanup;
1096
1099
                        }
1097
1100
 
1098
 
                        PKIX_CHECK(selectorMatch
1099
 
                                    (certSel,
1100
 
                                    cert,
1101
 
                                    &certMatch,
1102
 
                                    plContext),
1103
 
                                    PKIX_SELECTORMATCHFAILED);
1104
 
 
1105
 
                        if (certMatch){
 
1101
                        selectorError = selectorMatch(certSel, cert, plContext);
 
1102
                        if (!selectorError){
1106
1103
                            /* put on the return list */
1107
1104
                            PKIX_CHECK(PKIX_List_AppendItem
1108
1105
                                   (selCertList,
1109
1106
                                   (PKIX_PL_Object *)cert,
1110
1107
                                   plContext),
1111
1108
                                  PKIX_LISTAPPENDITEMFAILED);
1112
 
 
1113
 
                            *pFound = PKIX_TRUE;
 
1109
                        } else {
 
1110
                            PKIX_DECREF(selectorError);
1114
1111
                        }
1115
1112
 
1116
1113
                        PKIX_DECREF(cert);
1149
1146
        PKIX_DECREF(selCertList);
1150
1147
        PKIX_DECREF(invalidAfterDate);
1151
1148
        PKIX_DECREF(cachedCertError);
 
1149
        PKIX_DECREF(selectorError);
1152
1150
 
1153
1151
        PKIX_RETURN(BUILD);
1154
1152
}