Reset the cert cache and clobber cert handles on token insertion an removal

This commit is contained in:
relyea%netscape.com 2002-06-13 21:40:43 +00:00
parent a5fb0edafa
commit b7167f5cba

View File

@ -32,7 +32,7 @@
*/
#ifdef DEBUG
static const char CVS_ID[] = "@(#) $RCSfile: devslot.c,v $ $Revision: 1.8 $ $Date: 2002/05/21 21:23:33 $ $Name: $";
static const char CVS_ID[] = "@(#) $RCSfile: devslot.c,v $ $Revision: 1.9 $ $Date: 2002/06/13 21:40:43 $ $Name: $";
#endif /* DEBUG */
#ifndef NSSCKEPV_H
@ -331,6 +331,12 @@ nssSlot_IsTokenPresent
if (session->handle != CK_INVALID_SESSION) {
return PR_TRUE;
} else {
/* the token has been removed, and reinserted, invalidate all the old
* information we had on this token */
#ifdef NSS_3_4_CODE
nssToken_NotifyCertsNotVisible(slot->token);
#endif /* NSS_3_4_CODE */
nssToken_Remove(slot->token);
/* token has been removed, need to refresh with new session */
nssrv = nssSlot_Refresh(slot);
if (nssrv != PR_SUCCESS) {