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

Side by Side Diff: nss/lib/pk11wrap/pk11slot.c

Issue 195763027: Update NSS to NSS_3_16_RC0. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/nss/
Patch Set: Use the RTM tag Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « nss/lib/pk11wrap/pk11pub.h ('k') | nss/lib/pki/tdcache.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* This Source Code Form is subject to the terms of the Mozilla Public 1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4 /* 4 /*
5 * Deal with PKCS #11 Slots. 5 * Deal with PKCS #11 Slots.
6 */ 6 */
7 #include "seccomon.h" 7 #include "seccomon.h"
8 #include "secmod.h" 8 #include "secmod.h"
9 #include "nssilock.h" 9 #include "nssilock.h"
10 #include "secmodi.h" 10 #include "secmodi.h"
(...skipping 930 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 941
942 return; 942 return;
943 } 943 }
944 944
945 945
946 /* 946 /*
947 * update a slot to its new attribute according to the slot list 947 * update a slot to its new attribute according to the slot list
948 * returns: SECSuccess if nothing to do or add/delete is successful 948 * returns: SECSuccess if nothing to do or add/delete is successful
949 */ 949 */
950 SECStatus 950 SECStatus
951 PK11_UpdateSlotAttribute(PK11SlotInfo *slot, PK11DefaultArrayEntry *entry, 951 PK11_UpdateSlotAttribute(PK11SlotInfo *slot,
952 PRBool add) 952 const PK11DefaultArrayEntry *entry,
953 /* add: PR_TRUE if want to turn on */ 953 PRBool add)
954 /* add: PR_TRUE if want to turn on */
954 { 955 {
955 SECStatus result = SECSuccess; 956 SECStatus result = SECSuccess;
956 PK11SlotList *slotList = PK11_GetSlotList(entry->mechanism); 957 PK11SlotList *slotList = PK11_GetSlotList(entry->mechanism);
957 958
958 if (add) { /* trying to turn on a mechanism */ 959 if (add) { /* trying to turn on a mechanism */
959 960
960 /* turn on the default flag in the slot */ 961 /* turn on the default flag in the slot */
961 slot->defaultFlags |= entry->flag; 962 slot->defaultFlags |= entry->flag;
962 963
963 /* add this slot to the list */ 964 /* add this slot to the list */
(...skipping 1425 matching lines...) Expand 10 before | Expand all | Expand 10 after
2389 first_time_set = PR_TRUE; 2390 first_time_set = PR_TRUE;
2390 } 2391 }
2391 if ((interval-first_time) > timeout) { 2392 if ((interval-first_time) > timeout) {
2392 return waitForRemoval ? PK11TokenPresent : PK11TokenRemoved; 2393 return waitForRemoval ? PK11TokenPresent : PK11TokenRemoved;
2393 } 2394 }
2394 } 2395 }
2395 PR_Sleep(latency); 2396 PR_Sleep(latency);
2396 } 2397 }
2397 return waitForRemoval ? PK11TokenRemoved : PK11TokenPresent; 2398 return waitForRemoval ? PK11TokenRemoved : PK11TokenPresent;
2398 } 2399 }
OLDNEW
« no previous file with comments | « nss/lib/pk11wrap/pk11pub.h ('k') | nss/lib/pki/tdcache.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698