aboutsummaryrefslogtreecommitdiffstats
path: root/TPM2-Plugin/lib/include/tpm2_tcti_ldr.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_tcti_ldr.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_tcti_ldr.h')
-rw-r--r--TPM2-Plugin/lib/include/tpm2_tcti_ldr.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/TPM2-Plugin/lib/include/tpm2_tcti_ldr.h b/TPM2-Plugin/lib/include/tpm2_tcti_ldr.h
index 1e20d3d..684e5e2 100644
--- a/TPM2-Plugin/lib/include/tpm2_tcti_ldr.h
+++ b/TPM2-Plugin/lib/include/tpm2_tcti_ldr.h
@@ -25,7 +25,7 @@
// THE POSSIBILITY OF SUCH DAMAGE.
//**********************************************************************;
-#include <sapi/tpm20.h>
+#include <tss2/tss2_sys.h>
#ifndef LIB_TPM2_TCTI_LDR_H_
#define LIB_TPM2_TCTI_LDR_H_
@@ -34,8 +34,8 @@
* Loads a TCTI from a friendly name, library name, or path.
* For example
* friendly: path = tabrmd
- * library name: path = libtcti-socket.so
- * full path: path = /home/user/lib/libtcti-custom.so
+ * library name: path = libtss2-tcti-mssim.so
+ * full path: path = /home/user/lib/libtss2-tcti-custom.so
* @param path
* The path/library to load.
* @param opts
@@ -55,6 +55,16 @@ TSS2_TCTI_CONTEXT *tpm2_tcti_ldr_load(const char *path, const char *opts);
const TSS2_TCTI_INFO *tpm2_tcti_ldr_getinfo(void);
/**
+ * Given a tcti name, like mssim, tells you if the
+ * library is present using dlopen(3).
+ * @param name
+ * The friendly name of the tcti.
+ * @return
+ * True if present, false otherwise.
+ */
+bool tpm2_tcti_ldr_is_tcti_present(const char *name);
+
+/**
* Unloads the tcti loaded via tpm2_tcti_ldr_load();
*/
void tpm2_tcti_ldr_unload(void);