From b0a4247cce2fa60a0af9dab095747c561deb8bec Mon Sep 17 00:00:00 2001 From: jmxnzo Date: Wed, 18 Dec 2024 11:57:54 +0100 Subject: [PATCH] attestation.snp: set productLine in verifyOpts bcs of reference values dependence --- internal/manifest/manifest.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/manifest/manifest.go b/internal/manifest/manifest.go index 06b5f6280c..f69194011b 100644 --- a/internal/manifest/manifest.go +++ b/internal/manifest/manifest.go @@ -214,6 +214,11 @@ func (m *Manifest) SNPValidateOpts(kdsGetter trust.HTTPSGetter) ([]ValidatorOpti } verifyOpts := verify.DefaultOptions() + // Setting the productLine explicitly, because of full dependence of trustedMeasurements and derivation of trustedRoots on productLine. + verifyOpts.Product, err = kds.ParseProductLine(string(refVal.ProductName)) + if err != nil { + return nil, fmt.Errorf("SNP reference values: %w", err) + } verifyOpts.TrustedRoots, err = trustedRoots(refVal.ProductName) if err != nil { return nil, fmt.Errorf("determine trusted roots: %w", err) @@ -281,6 +286,8 @@ func trustedRoots(productName ProductName) (map[string][]*trust.AMDRootCerts, er return trustedRoots, nil } + + // The QE Vendor ID used by Intel. var intelQeVendorID = []byte{0x93, 0x9a, 0x72, 0x33, 0xf7, 0x9c, 0x4c, 0xa9, 0x94, 0x0a, 0x0d, 0xb3, 0x95, 0x7f, 0x06, 0x07}