aboutsummaryrefslogtreecommitdiff
path: root/include/tpm-v2.h
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2018-05-15 11:57:19 +0200
committerTom Rini <trini@konsulko.com>2018-05-25 20:12:58 -0400
commitdc26e913a8d1a62bd4112f41232e0273ee66423d (patch)
tree6f4bb41b953a1df5d245b2a4205fa6eb3234abd6 /include/tpm-v2.h
parentda9c3392e6cb2f3bf6d9973b1bda3b6881608b8e (diff)
downloadu-boot-dc26e913a8d1a62bd4112f41232e0273ee66423d.zip
u-boot-dc26e913a8d1a62bd4112f41232e0273ee66423d.tar.gz
u-boot-dc26e913a8d1a62bd4112f41232e0273ee66423d.tar.bz2
tpm: add TPM2_HierarchyChangeAuth command support
Add support for the TPM2_HierarchyChangeAuth command. Change the command file and the help accordingly. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'include/tpm-v2.h')
-rw-r--r--include/tpm-v2.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/tpm-v2.h b/include/tpm-v2.h
index ab8f113..be1aa2c 100644
--- a/include/tpm-v2.h
+++ b/include/tpm-v2.h
@@ -216,4 +216,18 @@ u32 tpm2_dam_parameters(const char *pw, const ssize_t pw_sz,
unsigned int max_tries, unsigned int recovery_time,
unsigned int lockout_recovery);
+/**
+ * Issue a TPM2_HierarchyChangeAuth command.
+ *
+ * @handle Handle
+ * @newpw New password
+ * @newpw_sz Length of the new password
+ * @oldpw Old password
+ * @oldpw_sz Length of the old password
+ *
+ * @return code of the operation
+ */
+int tpm2_change_auth(u32 handle, const char *newpw, const ssize_t newpw_sz,
+ const char *oldpw, const ssize_t oldpw_sz);
+
#endif /* __TPM_V2_H */