Turn off caching for non-hardware tokens for now until we fix some of our
authorrelyea%netscape.com
Thu, 25 Apr 2002 00:25:58 +0000
changeset 3049 96c62d340c182e9ae7881f01ac223d123e5c0ba8
parent 3048 6970c038eb6d02266bdd4ac147eefc7d953f65d9
child 3050 41fc9bb4460e9d4f01158ad4db14a1ed3fb4f4af
push idunknown
push userunknown
push dateunknown
Turn off caching for non-hardware tokens for now until we fix some of our tokens which can be updated out-of-band to use the proper 'removable token' semantics.
security/nss/lib/pk11wrap/dev3hack.c
--- a/security/nss/lib/pk11wrap/dev3hack.c
+++ b/security/nss/lib/pk11wrap/dev3hack.c
@@ -157,19 +157,18 @@ nssToken_CreateFromPK11SlotInfo(NSSTrust
     rvToken->base.lock = PZ_NewLock(nssILockOther);
     rvToken->base.arena = arena;
     rvToken->pk11slot = nss3slot;
     rvToken->epv = nss3slot->functionList;
     rvToken->defaultSession = nssSession_ImportNSS3Session(td->arena,
                                                        nss3slot->session,
                                                        nss3slot->sessionLock,
                                                        nss3slot->defRWSession);
-    /* if (!PK11_IsInternal(nss3slot) && PK11_IsHW(nss3slot)) */
     /* The above test was used in 3.4, for this cache have it always on */
-    if (PR_TRUE) {
+    if (!PK11_IsInternal(nss3slot) && PK11_IsHW(nss3slot)) {
 	rvToken->cache = nssTokenObjectCache_Create(rvToken, 
 	                                            PR_TRUE, PR_TRUE, PR_TRUE);
 	if (!rvToken->cache) {
 	    nssArena_Destroy(arena);
 	    return (NSSToken *)NULL;
 	}
     }
     rvToken->trustDomain = td;