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 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
826 return NULL; | 826 return NULL; |
827 #endif | 827 #endif |
828 switch (type) { | 828 switch (type) { |
829 case CKM_SEED_CBC: | 829 case CKM_SEED_CBC: |
830 case CKM_SEED_ECB: | 830 case CKM_SEED_ECB: |
831 return &pk11_seedSlotList; | 831 return &pk11_seedSlotList; |
832 case CKM_CAMELLIA_CBC: | 832 case CKM_CAMELLIA_CBC: |
833 case CKM_CAMELLIA_ECB: | 833 case CKM_CAMELLIA_ECB: |
834 return &pk11_camelliaSlotList; | 834 return &pk11_camelliaSlotList; |
835 case CKM_AES_CBC: | 835 case CKM_AES_CBC: |
| 836 case CKM_AES_CCM: |
| 837 case CKM_AES_CTR: |
| 838 case CKM_AES_CTS: |
| 839 case CKM_AES_GCM: |
836 case CKM_AES_ECB: | 840 case CKM_AES_ECB: |
837 return &pk11_aesSlotList; | 841 return &pk11_aesSlotList; |
838 case CKM_DES_CBC: | 842 case CKM_DES_CBC: |
839 case CKM_DES_ECB: | 843 case CKM_DES_ECB: |
840 case CKM_DES3_ECB: | 844 case CKM_DES3_ECB: |
841 case CKM_DES3_CBC: | 845 case CKM_DES3_CBC: |
842 return &pk11_desSlotList; | 846 return &pk11_desSlotList; |
843 case CKM_RC4: | 847 case CKM_RC4: |
844 return &pk11_rc4SlotList; | 848 return &pk11_rc4SlotList; |
845 case CKM_RC5_CBC: | 849 case CKM_RC5_CBC: |
(...skipping 27 matching lines...) Expand all Loading... |
873 case CKM_EC_KEY_PAIR_GEN: /* aka CKM_ECDSA_KEY_PAIR_GEN */ | 877 case CKM_EC_KEY_PAIR_GEN: /* aka CKM_ECDSA_KEY_PAIR_GEN */ |
874 case CKM_ECDH1_DERIVE: | 878 case CKM_ECDH1_DERIVE: |
875 return &pk11_ecSlotList; | 879 return &pk11_ecSlotList; |
876 case CKM_SSL3_PRE_MASTER_KEY_GEN: | 880 case CKM_SSL3_PRE_MASTER_KEY_GEN: |
877 case CKM_SSL3_MASTER_KEY_DERIVE: | 881 case CKM_SSL3_MASTER_KEY_DERIVE: |
878 case CKM_SSL3_SHA1_MAC: | 882 case CKM_SSL3_SHA1_MAC: |
879 case CKM_SSL3_MD5_MAC: | 883 case CKM_SSL3_MD5_MAC: |
880 return &pk11_sslSlotList; | 884 return &pk11_sslSlotList; |
881 case CKM_TLS_MASTER_KEY_DERIVE: | 885 case CKM_TLS_MASTER_KEY_DERIVE: |
882 case CKM_TLS_KEY_AND_MAC_DERIVE: | 886 case CKM_TLS_KEY_AND_MAC_DERIVE: |
| 887 case CKM_NSS_TLS_KEY_AND_MAC_DERIVE_SHA256: |
883 return &pk11_tlsSlotList; | 888 return &pk11_tlsSlotList; |
884 case CKM_IDEA_CBC: | 889 case CKM_IDEA_CBC: |
885 case CKM_IDEA_ECB: | 890 case CKM_IDEA_ECB: |
886 return &pk11_ideaSlotList; | 891 return &pk11_ideaSlotList; |
887 case CKM_FAKE_RANDOM: | 892 case CKM_FAKE_RANDOM: |
888 return &pk11_randomSlotList; | 893 return &pk11_randomSlotList; |
889 } | 894 } |
890 return NULL; | 895 return NULL; |
891 } | 896 } |
892 | 897 |
(...skipping 1491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2384 first_time_set = PR_TRUE; | 2389 first_time_set = PR_TRUE; |
2385 } | 2390 } |
2386 if ((interval-first_time) > timeout) { | 2391 if ((interval-first_time) > timeout) { |
2387 return waitForRemoval ? PK11TokenPresent : PK11TokenRemoved; | 2392 return waitForRemoval ? PK11TokenPresent : PK11TokenRemoved; |
2388 } | 2393 } |
2389 } | 2394 } |
2390 PR_Sleep(latency); | 2395 PR_Sleep(latency); |
2391 } | 2396 } |
2392 return waitForRemoval ? PK11TokenRemoved : PK11TokenPresent; | 2397 return waitForRemoval ? PK11TokenRemoved : PK11TokenPresent; |
2393 } | 2398 } |
OLD | NEW |