diff --git a/e2e/openssl/openssl_test.go b/e2e/openssl/openssl_test.go index 6b64e0b7a2..c179099d40 100644 --- a/e2e/openssl/openssl_test.go +++ b/e2e/openssl/openssl_test.go @@ -70,10 +70,10 @@ func TestOpenSSL(t *testing.T) { var m manifest.Manifest require.NoError(t, json.Unmarshal(manifestBytes, &m)) - m.ReferenceValues.AKS.SNP.MinimumTCB.BootloaderVersion = toPtr(manifest.SVN(0)) - m.ReferenceValues.AKS.SNP.MinimumTCB.TEEVersion = toPtr(manifest.SVN(0)) - m.ReferenceValues.AKS.SNP.MinimumTCB.SNPVersion = toPtr(manifest.SVN(0)) - m.ReferenceValues.AKS.SNP.MinimumTCB.MicrocodeVersion = toPtr(manifest.SVN(0)) + m.ReferenceValues.BareMetalSNP.SNP.MinimumTCB.BootloaderVersion = toPtr(manifest.SVN(0)) + m.ReferenceValues.BareMetalSNP.SNP.MinimumTCB.TEEVersion = toPtr(manifest.SVN(0)) + m.ReferenceValues.BareMetalSNP.SNP.MinimumTCB.SNPVersion = toPtr(manifest.SVN(0)) + m.ReferenceValues.BareMetalSNP.SNP.MinimumTCB.MicrocodeVersion = toPtr(manifest.SVN(0)) manifestBytes, err = json.Marshal(m) require.NoError(t, err) diff --git a/internal/manifest/manifest.go b/internal/manifest/manifest.go index 10bfbf885a..197b5ccebb 100644 --- a/internal/manifest/manifest.go +++ b/internal/manifest/manifest.go @@ -180,6 +180,8 @@ func (m *Manifest) RuntimeHandler(platform platforms.Platform) (string, error) { return fmt.Sprintf("contrast-cc-%s", m.ReferenceValues.AKS.TrustedMeasurement[:32]), nil case platforms.K3sQEMUTDX, platforms.RKE2QEMUTDX: return fmt.Sprintf("contrast-cc-%s", m.ReferenceValues.BareMetalTDX.TrustedMeasurement[:32]), nil + case platforms.K3sQEMUSNP: + return fmt.Sprintf("contrast-cc-%s", m.ReferenceValues.BareMetalSNP.TrustedMeasurement[:32]), nil default: return "", fmt.Errorf("unsupported platform %s", platform) } diff --git a/internal/manifest/referencevalues.go b/internal/manifest/referencevalues.go index 86c16a5941..91d8d4ae9b 100644 --- a/internal/manifest/referencevalues.go +++ b/internal/manifest/referencevalues.go @@ -25,6 +25,8 @@ var ( type ReferenceValues struct { // AKS holds the reference values for AKS. AKS *AKSReferenceValues + // BareMetalSNP holds the reference values for SNP on bare metal. + BareMetalSNP *BareMetalSNPReferenceValues // BareMetalTDX holds the reference values for TDX on bare metal. BareMetalTDX *BareMetalTDXReferenceValues } @@ -35,6 +37,12 @@ type AKSReferenceValues struct { TrustedMeasurement HexString } +// BareMetalSNPReferenceValues contains reference values for BareMetalSNP. +type BareMetalSNPReferenceValues struct { + SNP SNPReferenceValues + TrustedMeasurement HexString +} + // BareMetalTDXReferenceValues contains reference values for BareMetalTDX. type BareMetalTDXReferenceValues struct { TrustedMeasurement HexString