diff options
author | Ritu Sood <ritu.sood@intel.com> | 2018-04-26 01:50:05 +0000 |
---|---|---|
committer | Ritu Sood <ritu.sood@intel.com> | 2018-05-24 05:55:20 +0000 |
commit | 57c7ad1aa0e485b5594f27f1ab501ff0306fe2fc (patch) | |
tree | f47b764bda303958051dae4f3e4f0222c338ac3e /SoftHSMv2/src/lib/HwInfra/HwInfra.h | |
parent | c1c9bfcabc4a5e4147d19c599de7d9bf925fa98b (diff) |
Added a new Attribute to store TPM key handle
Includes changes to detect existing instances of key and
also some bug fixes. Also added new functionality for
RSA_SignUpdate, RSA_SignFinal and RSA_Cleanup
Issue-ID: AAF-260
Change-Id: Ib064e86b8f112784ed6d352ab1557ab9a13c5978
Signed-off-by: Ritu Sood <ritu.sood@intel.com>
Diffstat (limited to 'SoftHSMv2/src/lib/HwInfra/HwInfra.h')
-rw-r--r-- | SoftHSMv2/src/lib/HwInfra/HwInfra.h | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/SoftHSMv2/src/lib/HwInfra/HwInfra.h b/SoftHSMv2/src/lib/HwInfra/HwInfra.h index a62bd7d..8cbbada 100644 --- a/SoftHSMv2/src/lib/HwInfra/HwInfra.h +++ b/SoftHSMv2/src/lib/HwInfra/HwInfra.h @@ -50,18 +50,26 @@ int get_all_file_contents(char *dirpath, char starting_char, SSHSM_HW_PLUGIN_ACTIVATE_LOAD_IN_INFO_t *c_buffers ); void free_buffers ( SSHSM_HW_PLUGIN_ACTIVATE_LOAD_IN_INFO_t *c_buffers ); -int program_pkcs11_info (char *dirpath, void *key_handle); +int program_pkcs11_info (char *dirpath, void *key_handle, SSHSM_HW_PLUGIN_IMPORT_PUBLIC_KEY_INFO_t* ik); int PrepareKeyInSoftHSM(unsigned int slot_id, unsigned char *upin, int upin_len, unsigned char *key_id, int key_id_len, - unsigned char *key_label, void *key_handle); + unsigned char *key_label, void *key_handle, + SSHSM_HW_PLUGIN_IMPORT_PUBLIC_KEY_INFO_t* ik); int HwInfraSignInit(void *keyHandle, unsigned long mechanism, - void* param, int paramLen); - -int HwInfraSign( void *keyHandle, unsigned long mechanism, - unsigned char *msg, int msg_len, + void* param, int paramLen, void **hwCryptoOpaque); +int HwInfraSign(void *keyHandle, unsigned long mechanism, + unsigned char *msg, int msg_len, void *hwCryptoOpaque, + unsigned char *outsig, int *outsiglen); +int HwInfraSignUpdate(void *keyHandle, unsigned long mechanism, + unsigned char *msg, int msg_len, void *hwCryptoOpaque); +int HwInfraSignFinal(void *keyHandle, unsigned long mechanism, + void *hwCryptoOpaque, unsigned char *outsig, int *outsiglen); +int HwInfraSignCleanup(void *keyHandle, unsigned long mechanism, + void *hwCryptoOpaque); + #define MAX_PARENT_PATH_NAME 256 @@ -76,6 +84,7 @@ int HwInfraSign( void *keyHandle, unsigned long mechanism, #define PLUGIN_DL_OPEN_ERROR (06) #define PLUGIN_DL_SYM_ERROR (07) #define PLUGIN_INIT_ERROR (10) +#define INVALID_KEY_ERROR (11) #if defined(__cplusplus) } |