summaryrefslogtreecommitdiffstats
path: root/TPM2-Plugin/lib/tpm2_plugin_init.c
diff options
context:
space:
mode:
authorNingSun <ning.sun@intel.com>2018-03-27 10:42:51 -0700
committerNingSun <ning.sun@intel.com>2018-03-28 16:03:21 -0700
commit8a5b33a9ba846d785d244e29bc29a46f7be34928 (patch)
treea5b6ad7d3950a57fefd60dd1200c4ce52dd959b5 /TPM2-Plugin/lib/tpm2_plugin_init.c
parentda00ff6db5e68773996ec79d711c45fb3444c580 (diff)
Add more codes in tpm2-plugin
Implement tpm2_plugin_load_key() and tpm2_plugin_rsa_sign() APIs Issue-ID: AAF-94 Change-Id: I5f4329fdf973e52264d9e0e8aabc864c5fbdeebf Signed-off-by: NingSun <ning.sun@intel.com>
Diffstat (limited to 'TPM2-Plugin/lib/tpm2_plugin_init.c')
-rw-r--r--TPM2-Plugin/lib/tpm2_plugin_init.c26
1 files changed, 6 insertions, 20 deletions
diff --git a/TPM2-Plugin/lib/tpm2_plugin_init.c b/TPM2-Plugin/lib/tpm2_plugin_init.c
index 5ef0fce..d73b230 100644
--- a/TPM2-Plugin/lib/tpm2_plugin_init.c
+++ b/TPM2-Plugin/lib/tpm2_plugin_init.c
@@ -35,31 +35,17 @@
#include "tpm2_plugin_api.h"
-int __plugin_init(char* configPath)
-{
-// if tpm_plugin, do this
- printf("Init module done for TPM plug-in mode ! \n");
-// if SGX_plugin, do this
-
- return 0;
-}
-
-int __plugin_finialize()
-{
-// if tpm_plugin, do this
- printf("Finalize module done for SW mode ! \n");
-// if SGX_plugin, do this
-
- return 0;
-}
int __plugin_functions_mapping(plugin_register *plugin_fp)
{
printf("%s(): Assigning Function pointers for TPM (dTPM or PTT) mode \n", __func__);
- plugin_fp->cb_crypto_rsa_decrypt_init = NULL;
+ plugin_fp->cb_crypto_hw_plugin_init = &tpm2_plugin_init;
+ plugin_fp->cb_crypto_hw_plugin_uninit = &tpm2_plugin_uninit;
+ plugin_fp->cb_crypto_hw_plugin_activate = &tpm2_plugin_activate;
+ plugin_fp->cb_crypto_hw_plugin_load_key = &tpm2_plugin_load_key;
plugin_fp->cb_crypto_rsa_decrypt = NULL;
- plugin_fp->cb_crypto_rsa_sign_init = &tpm2_rsa_sign_init;
- plugin_fp->cb_crypto_rsa_sign = &tpm2_rsa_sign;
+ plugin_fp->cb_crypto_rsa_sign_init = &tpm2_plugin_rsa_sign_init;
+ plugin_fp->cb_crypto_rsa_sign = &tpm2_plugin_rsa_sign;
plugin_fp->cb_crypto_rsa_sign_update = NULL;
plugin_fp->cb_crypto_rsa_sign_final = NULL;
plugin_fp->cb_crypto_ecdsa_sign = NULL;