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 the Symkey wrapper and the PKCS context | 5 * This file implements the Symkey wrapper and the PKCS context |
6 * Interfaces. | 6 * Interfaces. |
7 */ | 7 */ |
8 | 8 |
9 #include "seccomon.h" | 9 #include "seccomon.h" |
10 #include "secmod.h" | 10 #include "secmod.h" |
(...skipping 1803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1814 /* get our key Structure */ | 1814 /* get our key Structure */ |
1815 symKey = pk11_CreateSymKey(slot, target, PR_TRUE, PR_TRUE, wincx); | 1815 symKey = pk11_CreateSymKey(slot, target, PR_TRUE, PR_TRUE, wincx); |
1816 if (symKey == NULL) { | 1816 if (symKey == NULL) { |
1817 return NULL; | 1817 return NULL; |
1818 } | 1818 } |
1819 | 1819 |
1820 symKey->origin = PK11_OriginDerive; | 1820 symKey->origin = PK11_OriginDerive; |
1821 | 1821 |
1822 switch (privKey->keyType) { | 1822 switch (privKey->keyType) { |
1823 case rsaKey: | 1823 case rsaKey: |
| 1824 case rsaPssKey: |
| 1825 case rsaOaepKey: |
1824 case nullKey: | 1826 case nullKey: |
1825 PORT_SetError(SEC_ERROR_BAD_KEY); | 1827 PORT_SetError(SEC_ERROR_BAD_KEY); |
1826 break; | 1828 break; |
1827 case dsaKey: | 1829 case dsaKey: |
1828 case keaKey: | 1830 case keaKey: |
1829 case fortezzaKey: | 1831 case fortezzaKey: |
1830 { | 1832 { |
1831 CK_KEA_DERIVE_PARAMS param; | 1833 CK_KEA_DERIVE_PARAMS param; |
1832 param.isSender = (CK_BBOOL) isSender; | 1834 param.isSender = (CK_BBOOL) isSender; |
1833 param.ulRandomLen = randomA->len; | 1835 param.ulRandomLen = randomA->len; |
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2661 PK11_ExitSlotMonitor(symKey->slot); | 2663 PK11_ExitSlotMonitor(symKey->slot); |
2662 return rv; | 2664 return rv; |
2663 } | 2665 } |
2664 | 2666 |
2665 CK_OBJECT_HANDLE | 2667 CK_OBJECT_HANDLE |
2666 PK11_GetSymKeyHandle(PK11SymKey *symKey) | 2668 PK11_GetSymKeyHandle(PK11SymKey *symKey) |
2667 { | 2669 { |
2668 return symKey->objectID; | 2670 return symKey->objectID; |
2669 } | 2671 } |
2670 | 2672 |
OLD | NEW |