Skip to content

Commit 1ac35b2

Browse files
committed
Get auxblob for SEV-SNP only in TSM attester
Intel TDX does not use auxblob currently. Query the TSM report twice, for SEV-SNP, one to get the provider and outblob, and the other to fetch the auxblob. Signed-off-by: Ian Chin Wang <[email protected]>
1 parent 0851e95 commit 1ac35b2

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

attesters/tsm/tsm.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ func (t *TSMPlugin) GetEvidence(in *compositor.EvidenceIn) *compositor.EvidenceO
9595
if in.ContentType == format.ContentType {
9696
req := &report.Request{
9797
InBlob: in.Nonce,
98-
GetAuxBlob: true,
98+
GetAuxBlob: false,
9999
}
100100

101101
options := make(map[string]string)
@@ -135,6 +135,17 @@ func (t *TSMPlugin) GetEvidence(in *compositor.EvidenceIn) *compositor.EvidenceO
135135
AuxBlob: resp.AuxBlob,
136136
}
137137

138+
// SEV-SNP stores cert table in auxblob. Get the report one more time to fetch the auxblob
139+
if resp.Provider == "sev_guest" {
140+
req.GetAuxBlob = true
141+
resp, err := report.Get(client, req)
142+
if err != nil {
143+
errMsg := fmt.Errorf("failed to get TSM report: %v", err)
144+
return getEvidenceError(errMsg)
145+
}
146+
out.AuxBlob = resp.AuxBlob
147+
}
148+
138149
var encodeOp func() ([]byte, error)
139150
encodeAs := "JSON"
140151

0 commit comments

Comments
 (0)