Skip to content

Commit

Permalink
Disambiguate SEV-SNP configfs use from other providers
Browse files Browse the repository at this point in the history
The auxblob attribute is specific to sev-guest.
  • Loading branch information
deeglaze committed Oct 9, 2024
1 parent 53a00ff commit ba39624
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions client/client_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,16 @@ type LinuxConfigFsQuoteProvider struct{}

// IsSupported checks if TSM client can be created to use ConfigFS system.
func (p *LinuxConfigFsQuoteProvider) IsSupported() bool {
_, err := linuxtsm.MakeClient()
return err == nil
c, err := linuxtsm.MakeClient()
if err != nil {
return false
}
r, err := report.Create(c, &report.Request{})
if err != nil {
return false
}
provider, err := r.ReadOption("provider")
return err == nil && string(provider) == "sev_guest\n"
}

// GetRawQuoteAtLevel returns byte format attestation plus certificate table via ConfigFS.
Expand Down

0 comments on commit ba39624

Please sign in to comment.