]> git.ipfire.org Git - thirdparty/strongswan.git/blobdiff - src/libtpmtss/tpm_tss.h
tpm2-loadpkcs12: Load private key from PKCS#12 to TPM 2.0
[thirdparty/strongswan.git] / src / libtpmtss / tpm_tss.h
index bcb7ab949f5e0a216ab33f26dc40c7442575f12c..5211c52295ea2095b6836f368a365fd9376d571c 100644 (file)
@@ -155,6 +155,19 @@ struct tpm_tss_t {
        bool (*get_data)(tpm_tss_t *this, uint32_t hierarchy, uint32_t handle,
                                         chunk_t pin, chunk_t *data);
 
+       /**
+        * Permanently load a private key into TPM NV storage (TPM 2.0 only)
+        *
+        * @param handle                object handle to be assigned to TPM key
+        * @param hierarchy             hierarchy the TPM key object is attached to
+        * @param pin                   PIN code or empty chunk
+        * @param type                  private key type
+        * @param encoding              private key encoding
+        * @return                              TRUE if load succeeded
+        */
+       bool (*load_key)(tpm_tss_t *this, uint32_t hierarchy, uint32_t handle,
+                                        chunk_t pin, key_type_t type, chunk_t encoding);
+
        /**
         * Destroy a tpm_tss_t.
         */