diff options
| author | Miquel Raynal <[email protected]> | 2018-05-15 11:57:19 +0200 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2018-05-25 20:12:58 -0400 |
| commit | dc26e913a8d1a62bd4112f41232e0273ee66423d (patch) | |
| tree | 6f4bb41b953a1df5d245b2a4205fa6eb3234abd6 /include | |
| parent | da9c3392e6cb2f3bf6d9973b1bda3b6881608b8e (diff) | |
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 <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
Diffstat (limited to 'include')
| -rw-r--r-- | include/tpm-v2.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/tpm-v2.h b/include/tpm-v2.h index ab8f113d82b..be1aa2c705b 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 */ |
