GetIdKeyDigest: Cut HCL header from raw report

This commit is contained in:
Otto Bittner 2022-09-02 11:13:38 +02:00
parent cce2575d68
commit 50d3f3ca7f

View File

@ -55,7 +55,7 @@ func GetIdKeyDigest(open vtpm.TPMOpenFunc) ([]byte, error) {
return nil, fmt.Errorf("reading idx %x from TMP: %w", tpmReportIdx, err) return nil, fmt.Errorf("reading idx %x from TMP: %w", tpmReportIdx, err)
} }
report, err := newSNPReportFromBytes(reportRaw) report, err := newSNPReportFromBytes(reportRaw[lenHclHeader:])
if err != nil { if err != nil {
return nil, fmt.Errorf("creating snp report: %w", err) return nil, fmt.Errorf("creating snp report: %w", err)
} }