aboutsummaryrefslogtreecommitdiffstats
path: root/TPM2-Plugin/test/main.c
diff options
context:
space:
mode:
authorNingSun <ning.sun@intel.com>2018-04-26 14:20:38 -0700
committerNing Sun <ning.sun@intel.com>2018-05-24 21:23:58 +0000
commit1ca4825b215df6c3370f6e274d095b2d928e64b4 (patch)
tree47f7c6527e06f25ca8f0c325d807f54aea7690b2 /TPM2-Plugin/test/main.c
parent1432266ea7ce545a60b0b53f4c920e68bc1ed152 (diff)
Added 3 more TPM2 Plugin APIs
Added tpm2_plugin_rsa_sign_update(...), tpm2_plugin_rsa_sign_final(...), tpm2_plugin_rsa_sign_cleanup(...) APIs. Issue-ID: AAF-94 Change-Id: I104ff7b979329c03e91206d19371d3904f163993 Signed-off-by: NingSun <ning.sun@intel.com>
Diffstat (limited to 'TPM2-Plugin/test/main.c')
-rw-r--r--TPM2-Plugin/test/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/TPM2-Plugin/test/main.c b/TPM2-Plugin/test/main.c
index c9d15c8..9426529 100644
--- a/TPM2-Plugin/test/main.c
+++ b/TPM2-Plugin/test/main.c
@@ -24,6 +24,7 @@ void main(void)
void *param = NULL;
size_t len = 100;
void *keyHandle_sign = NULL;
+ unsigned long int hSession = 1;
unsigned char *msg;
int msg_len;
@@ -56,12 +57,12 @@ void main(void)
tpm2_plugin_activate(activate_in_info);
printf("---------------------------------------------\n");
- tpm2_plugin_rsa_sign_init(keyHandle_sign, mechanism, param, len);
+ tpm2_plugin_rsa_sign_init(keyHandle_sign, mechanism, param, len, (void *)hSession);
printf("---------------------------------------------\n");
tpm2_plugin_load_key(loadkey_in_info, keyHandle);
printf("---------------------------------------------\n");
- tpm2_plugin_rsa_sign(keyHandle_sign, mechanism, msg, msg_len, sig, sig_len);
+ tpm2_plugin_rsa_sign(keyHandle_sign, mechanism, msg, msg_len, (void *)hSession, sig, sig_len);
}