mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
vtpmmgr: Flush transient keys on shutdown
Remove our key so it isn't left in the TPM for someone to come along after vtpmmgr shutsdown. Signed-off-by: Jason Andryuk <jandryuk@gmail.com> Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Daniel P. Smith <dpsmith@apertussolutions.com>
This commit is contained in:
1 parent
3f1b5080d6
commit
ec9596dc53
1 file changed
+8
@@ -792,6 +792,14 @@ void vtpmmgr_shutdown(void)
|
||||
/* Close tpmback */
|
||||
shutdown_tpmback();
|
||||
|
||||
if (hw_is_tpm2()) {
|
||||
/* Blow away all stale handles left in the tpm*/
|
||||
if (flush_tpm2() != TPM_SUCCESS) {
|
||||
vtpmlogerror(VTPM_LOG_TPM,
|
||||
"TPM2_FlushResources failed, continuing shutdown..\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* Close tpmfront/tpm_tis */
|
||||
close(vtpm_globals.tpm_fd);
|
||||
|
||||
|
||||