Navigation Menu

Skip to content

Commit

Permalink
bug 129778, cert instances incorrectly reset when cert was not deleted
Browse files Browse the repository at this point in the history
checked in for wtc, r=mcgreer
  • Loading branch information
ian.mcgreer%sun.com committed Mar 14, 2002
1 parent 8f388fa commit 4f99503
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions security/nss/lib/pki/trustdomain.c
Expand Up @@ -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;
Expand All @@ -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 *
Expand Down

0 comments on commit 4f99503

Please sign in to comment.