mirror of
https://github.com/ultravioletrs/cocos.git
synced 2026-08-07 07:14:50 +00:00
NOISSUE - Extend the PCR16 with computation manifest JSON hash (#457)
CI / ci (push) Has been cancelled
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:
committed by
GitHub
parent
5960b06126
commit
3e474338c5
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user