aboutsummaryrefslogtreecommitdiffstats
path: root/TPM2-Plugin/lib/include/tpm2_plugin_api.h
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/include/tpm2_plugin_api.h
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/include/tpm2_plugin_api.h')
-rw-r--r--TPM2-Plugin/lib/include/tpm2_plugin_api.h26
1 files changed, 17 insertions, 9 deletions
diff --git a/TPM2-Plugin/lib/include/tpm2_plugin_api.h b/TPM2-Plugin/lib/include/tpm2_plugin_api.h
index 238af99..4c3ad63 100644
--- a/TPM2-Plugin/lib/include/tpm2_plugin_api.h
+++ b/TPM2-Plugin/lib/include/tpm2_plugin_api.h
@@ -35,7 +35,7 @@
#include <ctype.h>
#include <getopt.h>
-#include <sapi/tpm20.h>
+#include <tss2/tss2_sys.h>
#include "plugin_register.h"
@@ -90,6 +90,14 @@ void TeardownSysContext( TSS2_SYS_CONTEXT **sysContext );
TSS2_RC TeardownTctiResMgrContext( TSS2_TCTI_CONTEXT *tctiContext );
+int tpm2_plugin_init();
+int tpm2_plugin_uninit();
+int tpm2_plugin_activate(SSHSM_HW_PLUGIN_ACTIVATE_IN_INFO_t *activate_in_info);
+int tpm2_plugin_load_key(
+ SSHSM_HW_PLUGIN_LOAD_KEY_IN_INFO_t *loadkey_in_info,
+ void **keyHandle
+ );
+
int tpm2_rsa_create_object(
unsigned long appHandle,
//DhsmWPKRSAFormat* wpk,
@@ -104,13 +112,13 @@ int tpm2_rsa_create_object(
int tpm2_rsa_delete_object(
void *cb_object);
-int tpm2_rsa_sign_init(
+int tpm2_plugin_rsa_sign_init(
unsigned long mechanish,
void *param,
size_t len,
void *ctx);
-int tpm2_rsa_sign(
+int tpm2_plugin_rsa_sign(
void *ctx,
unsigned char *msg,
int msg_len,
@@ -119,12 +127,12 @@ int tpm2_rsa_sign(
int tpm2_import_object(
- unsigned long appHandle,
- unsigned char* tlvbuffer,
- int buflen,
- unsigned char* iv,
- int iv_len,
- unsigned char* tpm_pwd,
+ unsigned long appHandle,
+ unsigned char* tlvbuffer,
+ int buflen,
+ unsigned char* iv,
+ int iv_len,
+ unsigned char* tpm_pwd,
int tpm_pwd_len);