OLD | NEW |
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 998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1009 } | 1009 } |
1010 | 1010 |
1011 | 1011 |
1012 /****************************************************************** | 1012 /****************************************************************** |
1013 * Slot initialization | 1013 * Slot initialization |
1014 ******************************************************************/ | 1014 ******************************************************************/ |
1015 /* | 1015 /* |
1016 * turn a PKCS11 Static Label into a string | 1016 * turn a PKCS11 Static Label into a string |
1017 */ | 1017 */ |
1018 char * | 1018 char * |
1019 PK11_MakeString(PRArenaPool *arena,char *space, | 1019 PK11_MakeString(PLArenaPool *arena,char *space, |
1020 char *staticString,int stringLen) | 1020 char *staticString,int stringLen) |
1021 { | 1021 { |
1022 int i; | 1022 int i; |
1023 char *newString; | 1023 char *newString; |
1024 for(i=(stringLen-1); i >= 0; i--) { | 1024 for(i=(stringLen-1); i >= 0; i--) { |
1025 if (staticString[i] != ' ') break; | 1025 if (staticString[i] != ' ') break; |
1026 } | 1026 } |
1027 /* move i to point to the last space */ | 1027 /* move i to point to the last space */ |
1028 i++; | 1028 i++; |
1029 if (arena) { | 1029 if (arena) { |
(...skipping 1359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2389 first_time_set = PR_TRUE; | 2389 first_time_set = PR_TRUE; |
2390 } | 2390 } |
2391 if ((interval-first_time) > timeout) { | 2391 if ((interval-first_time) > timeout) { |
2392 return waitForRemoval ? PK11TokenPresent : PK11TokenRemoved; | 2392 return waitForRemoval ? PK11TokenPresent : PK11TokenRemoved; |
2393 } | 2393 } |
2394 } | 2394 } |
2395 PR_Sleep(latency); | 2395 PR_Sleep(latency); |
2396 } | 2396 } |
2397 return waitForRemoval ? PK11TokenRemoved : PK11TokenPresent; | 2397 return waitForRemoval ? PK11TokenRemoved : PK11TokenPresent; |
2398 } | 2398 } |
OLD | NEW |