aboutsummaryrefslogtreecommitdiffstats
path: root/TPM2-Plugin/test
diff options
context:
space:
mode:
authorNingSun <ning.sun@intel.com>2018-05-17 09:09:12 -0700
committerNingSun <ning.sun@intel.com>2018-05-17 09:30:18 -0700
commitc1c9bfcabc4a5e4147d19c599de7d9bf925fa98b (patch)
tree938f5f373f57fa41611ad0722abb283295e35eee /TPM2-Plugin/test
parent1432266ea7ce545a60b0b53f4c920e68bc1ed152 (diff)
Update tpm2_plugin_load_key() API
Add reading public key modulus and exponent information function in this API. Issue-ID: AAF-94 Change-Id: I9d1b54336842dfc89140e281cec2ee43f0bb13d3 Signed-off-by: NingSun <ning.sun@intel.com>
Diffstat (limited to 'TPM2-Plugin/test')
-rw-r--r--TPM2-Plugin/test/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/TPM2-Plugin/test/main.c b/TPM2-Plugin/test/main.c
index c9d15c8..31fa7d6 100644
--- a/TPM2-Plugin/test/main.c
+++ b/TPM2-Plugin/test/main.c
@@ -32,6 +32,9 @@ void main(void)
SSHSM_HW_PLUGIN_ACTIVATE_LOAD_IN_INFO_t *activate_in_info;
activate_in_info = malloc(sizeof(SSHSM_HW_PLUGIN_ACTIVATE_LOAD_IN_INFO_t));
+ SSHSM_HW_PLUGIN_IMPORT_PUBLIC_KEY_INFO_t *importkey_info;
+ importkey_info = malloc(sizeof(SSHSM_HW_PLUGIN_IMPORT_PUBLIC_KEY_INFO_t));
+
SSHSM_HW_PLUGIN_ACTIVATE_LOAD_IN_INFO_t *loadkey_in_info;
loadkey_in_info = malloc(sizeof(SSHSM_HW_PLUGIN_ACTIVATE_LOAD_IN_INFO_t));
loadkey_in_info->num_buffers = 2;
@@ -59,7 +62,7 @@ void main(void)
tpm2_plugin_rsa_sign_init(keyHandle_sign, mechanism, param, len);
printf("---------------------------------------------\n");
- tpm2_plugin_load_key(loadkey_in_info, keyHandle);
+ tpm2_plugin_load_key(loadkey_in_info, keyHandle, importkey_info);
printf("---------------------------------------------\n");
tpm2_plugin_rsa_sign(keyHandle_sign, mechanism, msg, msg_len, sig, sig_len);