Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: mozilla/security/nss/lib/pk11wrap/pk11util.c

Issue 10961060: Update NSS to NSS 3.14 Beta 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: Add the NSS snapshot timestamp to README.chromium and nss-checkout.sh Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mozilla/security/nss/lib/pk11wrap/pk11slot.c ('k') | mozilla/security/nss/lib/pk11wrap/secmodi.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mozilla/security/nss/lib/pk11wrap/pk11util.c
===================================================================
--- mozilla/security/nss/lib/pk11wrap/pk11util.c (revision 158129)
+++ mozilla/security/nss/lib/pk11wrap/pk11util.c (working copy)
@@ -14,6 +14,7 @@
#include "secerr.h"
#include "dev.h"
#include "pkcs11ni.h"
+#include "utilpars.h"
/* these are for displaying error messages */
@@ -1082,7 +1083,7 @@
}
SECMOD_ReleaseReadLock(moduleLock);
/* if everything was perm modules, don't lock up forever */
- if (!removableSlotsFound) {
+ if ((mod->slotCount !=0) && !removableSlotsFound) {
error =SEC_ERROR_NO_SLOT_SELECTED;
PZ_Lock(mod->refLock);
break;
@@ -1251,6 +1252,9 @@
ret = PR_TRUE;
break;
}
+ if (mod->slotCount == 0 ) {
+ ret = PR_TRUE;
+ }
SECMOD_ReleaseReadLock(moduleLock);
return ret;
}
@@ -1368,7 +1372,7 @@
}
/* we've found the slot, now build the moduleSpec */
- escSpec = secmod_DoubleEscape(moduleSpec, '>', ']');
+ escSpec = NSSUTIL_DoubleEscape(moduleSpec, '>', ']');
if (escSpec == NULL) {
PK11_FreeSlot(slot);
return NULL;
@@ -1389,7 +1393,17 @@
return NULL;
}
- return SECMOD_FindSlotByID(mod, slotID);
+ slot = SECMOD_FindSlotByID(mod, slotID);
+ if (slot) {
+ /* if we are in the delay period for the "isPresent" call, reset
+ * the delay since we know things have probably changed... */
+ if (slot->nssToken && slot->nssToken->slot) {
+ nssSlot_ResetDelay(slot->nssToken->slot);
+ }
+ /* force the slot info structures to properly reset */
+ (void)PK11_IsPresent(slot);
+ }
+ return slot;
}
/*
« no previous file with comments | « mozilla/security/nss/lib/pk11wrap/pk11slot.c ('k') | mozilla/security/nss/lib/pk11wrap/secmodi.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698