summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorian.mcgreer%sun.com <devnull@localhost>2002-03-01 16:28:53 +0000
committerian.mcgreer%sun.com <devnull@localhost>2002-03-01 16:28:53 +0000
commit99ea8622f6f12096f770bb521633ec971ab40b07 (patch)
tree52a2b73e19dee7a278f7747677e9fa0111babb7b
parentb48c8cd57a849e840d69e1ec7ecd08a16df18bd9 (diff)
downloadnss-hg-99ea8622f6f12096f770bb521633ec971ab40b07.tar.gz
another fix for bug 125808, force update of cache after login/logout
-rw-r--r--security/nss/lib/pk11wrap/pk11slot.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/security/nss/lib/pk11wrap/pk11slot.c b/security/nss/lib/pk11wrap/pk11slot.c
index fb7ff07ff..86c58ead8 100644
--- a/security/nss/lib/pk11wrap/pk11slot.c
+++ b/security/nss/lib/pk11wrap/pk11slot.c
@@ -51,6 +51,9 @@
#include "secerr.h"
/*#include "secpkcs5.h" */
+#include "dev3hack.h"
+#include "pki3hack.h"
+
/*************************************************************
* local static and global data
@@ -722,6 +725,9 @@ PK11_Logout(PK11SlotInfo *slot)
PK11_EnterSlotMonitor(slot);
crv = PK11_GETTAB(slot)->C_Logout(slot->session);
PK11_ExitSlotMonitor(slot);
+ if (slot->nssToken) {
+ nssToken_DestroyCertList(slot->nssToken, PR_TRUE);
+ }
if (crv != CKR_OK) {
PORT_SetError(PK11_MapError(crv));
return SECFailure;
@@ -1137,6 +1143,10 @@ PK11_DoPassword(PK11SlotInfo *slot, PRBool loadCerts, void *wincx)
}
if (rv == SECSuccess) {
rv = pk11_CheckVerifyTest(slot);
+ if (rv == SECSuccess && slot->nssToken) {
+ /* notify stan about the login */
+ nssToken_LoadCerts(slot->nssToken);
+ }
} else if (!attempt) PORT_SetError(SEC_ERROR_BAD_PASSWORD);
return rv;
}