Skip to content

Commit

Permalink
Merge pull request #135 from deeglaze/provider
Browse files Browse the repository at this point in the history
Disambiguate SEV-SNP configfs use from other providers
  • Loading branch information
deeglaze authored Oct 9, 2024
2 parents 53a00ff + ba39624 commit de2ac90
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 de2ac90

Please sign in to comment.