diff options
author | wtchang%redhat.com <devnull@localhost> | 2005-09-14 01:31:33 +0000 |
---|---|---|
committer | wtchang%redhat.com <devnull@localhost> | 2005-09-14 01:31:33 +0000 |
commit | aef78ee4f7ccf275b65ea6be7c4d6c0ba86b5106 (patch) | |
tree | 092ff5e96761c7c515dfb900b023c5fc926a2821 | |
parent | 982a4a33a06d621ea0c1ef2c6bfef39f51011132 (diff) | |
download | nss-hg-NSS_3_10_2_BETA1.tar.gz |
Bugzilla Bug 301554: Clear the 'Present' flag if slot fails to refresh.NSS_3_10_2_BETA1
relyea wrote the patch. r=wtc,nelsonb.
Tag: NSS_3_10_BRANCH
-rw-r--r-- | security/nss/lib/dev/devslot.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/security/nss/lib/dev/devslot.c b/security/nss/lib/dev/devslot.c index 9f51c6a35..586531f9c 100644 --- a/security/nss/lib/dev/devslot.c +++ b/security/nss/lib/dev/devslot.c @@ -356,8 +356,10 @@ 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 */ + /* the token has been removed, and reinserted, or the slot contains + * a token it doesn't recognize. invalidate all the old + * information we had on this token, if we can't refresh, clear + * the present flag */ #ifdef NSS_3_4_CODE nssToken_NotifyCertsNotVisible(slot->token); #endif /* NSS_3_4_CODE */ @@ -366,6 +368,7 @@ nssSlot_IsTokenPresent ( nssrv = nssSlot_Refresh(slot); if (nssrv != PR_SUCCESS) { slot->token->base.name[0] = 0; /* XXX */ + slot->ckFlags &= ~CKF_TOKEN_PRESENT; return PR_FALSE; } return PR_TRUE; |