NOISSUE - Extend the PCR16 with computation manifest JSON hash (#457)
CI / ci (push) Has been cancelled

* extend PCR16 with manifest

* fix ci

* fix PCR16 extension

* move pcr extension to executeRun

* put extension in a defer block
This commit is contained in:
Danko Miladinovic
2025-06-12 18:49:14 +02:00
committed by GitHub
parent 5960b06126
commit 3e474338c5
7 changed files with 59 additions and 26 deletions
+9 -1
View File
@@ -125,16 +125,24 @@ func SevGuesDeviceExists() bool {
}
func SevGuestvTPMExists() bool {
return vTPMExists() && SevGuesDeviceExists()
}
func vTPMExists() bool {
d, err := tpm2.OpenTPM()
if err != nil {
return false
}
d.Close()
return SevGuesDeviceExists()
return true
}
func isAzureVM() bool {
if !vTPMExists() {
return false
}
client := &http.Client{}
url := fmt.Sprintf("%s?api-version=%s", azureMetadataUrl, azureApiVersion)