summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtchang%redhat.com <devnull@localhost>2006-11-13 18:22:26 +0000
committerwtchang%redhat.com <devnull@localhost>2006-11-13 18:22:26 +0000
commit4ab68c0bba230bc4dfe238810729281c2fd06342 (patch)
tree0f32974b4d0043d80d1553426269a3e45ee6d279
parent26231f2ee521bfea68ad2732d59b16ef7cfd24a7 (diff)
downloadnss-hg-4ab68c0bba230bc4dfe238810729281c2fd06342.tar.gz
Bugzilla Bug 357197: fixed the fallthrough case in ocsp_CertIDsMatch. The
patch is contributed by Steve Parkinson <sparkins@redhat.com>. r=nelson,wtc Tag: NSS_3_11_BRANCH
-rw-r--r--security/nss/lib/certhigh/ocsp.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/security/nss/lib/certhigh/ocsp.c b/security/nss/lib/certhigh/ocsp.c
index 145751b65..fd7c6dce9 100644
--- a/security/nss/lib/certhigh/ocsp.c
+++ b/security/nss/lib/certhigh/ocsp.c
@@ -2806,7 +2806,6 @@ ocsp_CertIDsMatch(CERTCertDBHandle *handle,
CERTOCSPCertID *certID1, CERTOCSPCertID *certID2)
{
PRBool match = PR_FALSE;
- SECItem *foundHash = NULL;
SECOidTag hashAlg;
SECItem *keyHash = NULL;
SECItem *nameHash = NULL;
@@ -2851,17 +2850,10 @@ ocsp_CertIDsMatch(CERTCertDBHandle *handle,
keyHash = &certID1->issuerMD2KeyHash;
nameHash = &certID1->issuerMD2NameHash;
break;
- default:
- foundHash = NULL;
- break;
- }
-
- if (foundHash == NULL) {
- goto done;
}
- PORT_Assert(keyHash && nameHash);
- if ((SECITEM_CompareItem(nameHash, &certID2->issuerNameHash) == SECEqual)
+ if ((keyHash != NULL)
+ && (SECITEM_CompareItem(nameHash, &certID2->issuerNameHash) == SECEqual)
&& (SECITEM_CompareItem(keyHash, &certID2->issuerKeyHash) == SECEqual)) {
match = PR_TRUE;
}