summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorian.mcgreer%sun.com <devnull@localhost>2002-03-14 17:39:12 +0000
committerian.mcgreer%sun.com <devnull@localhost>2002-03-14 17:39:12 +0000
commit6194f7664e4241fa48df9e9503dd66858564d7d2 (patch)
tree67358293f75bb75642bb5d5738a13d9d50cd8ae2
parent5622c5e3bc9b23a4347c03daa20dfd580f2f0329 (diff)
downloadnss-hg-6194f7664e4241fa48df9e9503dd66858564d7d2.tar.gz
bug 129778, cert instances incorrectly reset when cert was not deleted
checked in for wtc, r=mcgreer
-rw-r--r--security/nss/lib/pki/trustdomain.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/security/nss/lib/pki/trustdomain.c b/security/nss/lib/pki/trustdomain.c
index 1e3ca163a..f3ebc5125 100644
--- a/security/nss/lib/pki/trustdomain.c
+++ b/security/nss/lib/pki/trustdomain.c
@@ -508,7 +508,8 @@ static PRBool cert_token_not_present(NSSCertificate *c)
{
nssListIterator *instances;
nssCryptokiInstance *instance;
- PRBool freeIt = PR_TRUE;
+ PRBool freeIt = PR_FALSE;
+ PRBool notPresent = PR_TRUE;
instances = nssList_CreateIterator(c->object.instanceList);
for (instance = (nssCryptokiInstance *)nssListIterator_Start(instances);
instance != (nssCryptokiInstance *)NULL;
@@ -517,17 +518,18 @@ static PRBool cert_token_not_present(NSSCertificate *c)
if (!nssToken_IsPresent(instance->token)) {
nssToken_DestroyCertList(instance->token, PR_TRUE);
nssList_Remove(c->object.instanceList, instance);
+ freeIt = PR_TRUE;
} else {
- freeIt = PR_FALSE;
+ notPresent = PR_FALSE;
}
}
nssListIterator_Finish(instances);
nssListIterator_Destroy(instances);
- if (!freeIt) {
+ if (freeIt) {
nssListIterator_Destroy(c->object.instances);
c->object.instances = nssList_CreateIterator(c->object.instanceList);
}
- return freeIt;
+ return notPresent;
}
NSS_IMPLEMENT NSSCertificate *