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 * This file implements PKCS 11 on top of our existing security modules | 5 * This file implements PKCS 11 on top of our existing security modules |
6 * | 6 * |
7 * For more information about PKCS 11 See PKCS 11 Token Inteface Standard. | 7 * For more information about PKCS 11 See PKCS 11 Token Inteface Standard. |
8 * This implementation has two slots: | 8 * This implementation has two slots: |
9 * slot 1 is our generic crypto support. It does not require login. | 9 * slot 1 is our generic crypto support. It does not require login. |
10 * It supports Public Key ops, and all they bulk ciphers and hashes. | 10 * It supports Public Key ops, and all they bulk ciphers and hashes. |
(...skipping 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1099 if ( !sftk_hasAttribute(object, CKA_VALUE)) { | 1099 if ( !sftk_hasAttribute(object, CKA_VALUE)) { |
1100 return CKR_TEMPLATE_INCOMPLETE; | 1100 return CKR_TEMPLATE_INCOMPLETE; |
1101 } | 1101 } |
1102 encrypt = CK_FALSE; | 1102 encrypt = CK_FALSE; |
1103 sign = CK_TRUE; | 1103 sign = CK_TRUE; |
1104 recover = CK_FALSE; | 1104 recover = CK_FALSE; |
1105 wrap = CK_FALSE; | 1105 wrap = CK_FALSE; |
1106 break; | 1106 break; |
1107 #endif /* NSS_ENABLE_ECC */ | 1107 #endif /* NSS_ENABLE_ECC */ |
1108 case CKK_NSS_JPAKE_ROUND1: | 1108 case CKK_NSS_JPAKE_ROUND1: |
1109 if (!sftk_hasAttribute(object, CKA_PRIME || | 1109 if (!sftk_hasAttribute(object, CKA_PRIME) || |
1110 !sftk_hasAttribute(object, CKA_SUBPRIME) || | 1110 !sftk_hasAttribute(object, CKA_SUBPRIME) || |
1111 !sftk_hasAttribute(object, CKA_BASE))) { | 1111 !sftk_hasAttribute(object, CKA_BASE)) { |
1112 return CKR_TEMPLATE_INCOMPLETE; | 1112 return CKR_TEMPLATE_INCOMPLETE; |
1113 } | 1113 } |
1114 /* fall through */ | 1114 /* fall through */ |
1115 case CKK_NSS_JPAKE_ROUND2: | 1115 case CKK_NSS_JPAKE_ROUND2: |
1116 /* CKA_NSS_JPAKE_SIGNERID and CKA_NSS_JPAKE_PEERID are checked in | 1116 /* CKA_NSS_JPAKE_SIGNERID and CKA_NSS_JPAKE_PEERID are checked in |
1117 the J-PAKE code. */ | 1117 the J-PAKE code. */ |
1118 encrypt = sign = recover = wrap = CK_FALSE; | 1118 encrypt = sign = recover = wrap = CK_FALSE; |
1119 derive = CK_TRUE; | 1119 derive = CK_TRUE; |
1120 createObjectInfo = PR_FALSE; | 1120 createObjectInfo = PR_FALSE; |
1121 break; | 1121 break; |
(...skipping 3603 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4725 | 4725 |
4726 | 4726 |
4727 CK_RV NSC_WaitForSlotEvent(CK_FLAGS flags, CK_SLOT_ID_PTR pSlot, | 4727 CK_RV NSC_WaitForSlotEvent(CK_FLAGS flags, CK_SLOT_ID_PTR pSlot, |
4728 CK_VOID_PTR pReserved) | 4728 CK_VOID_PTR pReserved) |
4729 { | 4729 { |
4730 CHECK_FORK(); | 4730 CHECK_FORK(); |
4731 | 4731 |
4732 return CKR_FUNCTION_NOT_SUPPORTED; | 4732 return CKR_FUNCTION_NOT_SUPPORTED; |
4733 } | 4733 } |
4734 | 4734 |
OLD | NEW |