Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions coev/cbor.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2025 Contributors to the Veraison project.
// Copyright 2025-2026 Contributors to the Veraison project.
// SPDX-License-Identifier: Apache-2.0

package coev
Expand Down Expand Up @@ -38,9 +38,10 @@ func coevTags() cbor.TagSet {

func initCBOREncMode() (en cbor.EncMode, err error) {
encOpt := cbor.EncOptions{
Sort: cbor.SortCoreDeterministic,
IndefLength: cbor.IndefLengthForbidden,
TimeTag: cbor.EncTagRequired,
Sort: cbor.SortCoreDeterministic,
IndefLength: cbor.IndefLengthForbidden,
NilContainers: cbor.NilContainerAsEmpty,
TimeTag: cbor.EncTagRequired,
}
return encOpt.EncModeWithTags(coevTags())
}
Expand Down
16 changes: 8 additions & 8 deletions coev/example_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2025 Contributors to the Veraison project.
// Copyright 2025-2026 Contributors to the Veraison project.
// SPDX-License-Identifier: Apache-2.0

package coev
Expand Down Expand Up @@ -29,8 +29,8 @@ func Example_encode_EvidenceTriples() {
comid.MustNewUUIDMeasurement(TestUUID).
SetRawValueBytes([]byte{0x01, 0x02, 0x03, 0x04}, []byte{0xff, 0xff, 0xff, 0xff}).
SetSVN(2).
AddDigest(swid.Sha256_32, []byte{0xab, 0xcd, 0xef, 0x00}).
AddDigest(swid.Sha256_32, []byte{0xff, 0xff, 0xff, 0xff}).
AddDigest(comid.Sha256_32, []byte{0xab, 0xcd, 0xef, 0x00}).
AddDigest(comid.Sha256_32, []byte{0xff, 0xff, 0xff, 0xff}).
SetFlagsTrue(comid.FlagIsDebug).
SetFlagsFalse(comid.FlagIsSecure).
SetSerialNumber("C02X70VHJHD5").
Expand Down Expand Up @@ -65,7 +65,7 @@ func Example_encode_EvidenceTriples() {

// Output:
// a300a1008182a100a500d86f445502c000016941434d45204c74642e026a526f616452756e6e65720300040181a200d8255031fb5abf023e4992aa4e95f9c1503bfa01aa01d90228020282820644abcdef00820644ffffffff03a201f403f504d9023044010203040544ffffffff064802005e1000000001075020010db8000000000000000000000068086c43303258373056484a484435094702deadbeefdead0a5031fb5abf023e4992aa4e95f9c1503bfa01d8255031fb5abf023e4992aa4e95f9c1503bfa026f68747470733a2f2f6162632e636f6d
// {"ev-triples":{"evidence-triples":[{"environment":{"class":{"id":{"type":"oid","value":"2.5.2.8192"},"vendor":"ACME Ltd.","model":"RoadRunner","layer":0,"index":1}},"measurements":[{"key":{"type":"uuid","value":"31fb5abf-023e-4992-aa4e-95f9c1503bfa"},"value":{"svn":{"type":"exact-value","value":2},"digests":["sha-256-32;q83vAA==","sha-256-32;/////w=="],"flags":{"is-secure":false,"is-debug":true},"raw-value":{"type":"bytes","value":"AQIDBA=="},"raw-value-mask":"/////w==","mac-addr":"02:00:5e:10:00:00:00:01","ip-addr":"2001:db8::68","serial-number":"C02X70VHJHD5","ueid":"At6tvu/erQ==","uuid":"31fb5abf-023e-4992-aa4e-95f9c1503bfa"}}]}]},"evidence-id":{"type":"uuid","value":"31fb5abf-023e-4992-aa4e-95f9c1503bfa"},"profile":"https://abc.com"}
// {"ev-triples":{"evidence-triples":[{"environment":{"class":{"id":{"type":"oid","value":"2.5.2.8192"},"vendor":"ACME Ltd.","model":"RoadRunner","layer":0,"index":1}},"measurements":[{"key":{"type":"uuid","value":"31fb5abf-023e-4992-aa4e-95f9c1503bfa"},"value":{"svn":{"type":"exact-value","value":2},"digests":[[6,"q83vAA"],[6,"_____w"]],"flags":{"is-secure":false,"is-debug":true},"raw-value":{"type":"bytes","value":"AQIDBA=="},"raw-value-mask":"/////w==","mac-addr":"02:00:5e:10:00:00:00:01","ip-addr":"2001:db8::68","serial-number":"C02X70VHJHD5","ueid":"At6tvu/erQ==","uuid":"31fb5abf-023e-4992-aa4e-95f9c1503bfa"}}]}]},"evidence-id":{"type":"uuid","value":"31fb5abf-023e-4992-aa4e-95f9c1503bfa"},"profile":"https://abc.com"}

}

Expand Down Expand Up @@ -238,8 +238,8 @@ func Example_decode_JSON() {
"value": 2
},
"digests": [
"sha-256-32;q83vAA==",
"sha-256-32;/////w=="
[6, "q83vAA"],
[6, "_____w"]
],
"flags": {
"is-secure": false,
Expand Down Expand Up @@ -284,8 +284,8 @@ func Example_decode_JSON() {
"value": 2
},
"digests": [
"sha-256-32;q83vAA==",
"sha-256-32;/////w=="
[6, "q83vAA"],
[6, "_____w"]
],
"flags": {
"is-secure": false,
Expand Down
39 changes: 16 additions & 23 deletions coev/profiles.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2025 Contributors to the Veraison project.
// Copyright 2025-2026 Contributors to the Veraison project.
// SPDX-License-Identifier: Apache-2.0

package coev
Expand All @@ -7,15 +7,15 @@ import (
"fmt"
"reflect"

"github.com/veraison/corim/corim"
"github.com/veraison/corim/extensions"
"github.com/veraison/eat"
)

// ProfileManifest associates an EAT profile ID with a set of extensions. It allows
// obtaining new Concise Evidence structure that had associated extensions
// registered.
type ProfileManifest struct {
ID *eat.Profile
ID *corim.Profile
MapExtensions extensions.Map
}

Expand Down Expand Up @@ -74,12 +74,13 @@ func (o *ProfileManifest) registerExtensions(e iextensible, points []extensions.
// RegisterProfile registers a set of extensions with the specified profile. If
// the profile has already been registered, or if the extensions are invalid,
// an error is returned.
func RegisterProfile(id *eat.Profile, exts extensions.Map) error {
strID, err := id.Get()
if err != nil {
func RegisterProfile(id *corim.Profile, exts extensions.Map) error {
if err := id.Valid(); err != nil {
return err
}

strID := id.String()

if _, ok := profilesRegister[strID]; ok {
return fmt.Errorf("profile with id %q already registered", strID)
}
Expand All @@ -102,32 +103,24 @@ func RegisterProfile(id *eat.Profile, exts extensions.Map) error {
// GetProfileManifest returns the ProfileManifest associated with the specified ID, or an empty
// profileManifest if no ProfileManifest has been registered for the ID. The second return
// value indicates whether a profileManifest for the ID has been found.
func GetProfileManifest(id *eat.Profile) (*ProfileManifest, bool) {
if id == nil {
func GetProfileManifest(id *corim.Profile) (*ProfileManifest, bool) {
if id.IsNil() {
return nil, false
}

strID, err := id.Get()
if err != nil {
return nil, false
}

prof, ok := profilesRegister[strID]
prof, ok := profilesRegister[id.String()]
return &prof, ok
}

// UnregisterProfile ensures there are no extensions registered for the
// specified profile ID. Returns true if extensions were previously registered
// and have been removed, and false otherwise.
func UnregisterProfile(id *eat.Profile) bool {
if id == nil {
func UnregisterProfile(id *corim.Profile) bool {
if id.IsNil() {
return false
}

strID, err := id.Get()
if err != nil {
return false
}
strID := id.String()

if _, ok := profilesRegister[strID]; ok {
delete(profilesRegister, strID)
Expand All @@ -140,7 +133,7 @@ func UnregisterProfile(id *eat.Profile) bool {
// UnmarshalConciseEvidenceFromCBOR unmarshals a ConciseEvidence from provided CBOR data. If
// there are extensions associated with the profile specified by the data, they
// will be registered with the coev.ConciseEvidence before it is unmarshaled.
func UnmarshalConciseEvidenceFromCBOR(buf []byte, profileID *eat.Profile) (*ConciseEvidence, error) {
func UnmarshalConciseEvidenceFromCBOR(buf []byte, profileID *corim.Profile) (*ConciseEvidence, error) {
var ret *ConciseEvidence

profileManifest, ok := GetProfileManifest(profileID)
Expand All @@ -160,10 +153,10 @@ func UnmarshalConciseEvidenceFromCBOR(buf []byte, profileID *eat.Profile) (*Conc
// GetConciseEvidence returns a pointer to a new ConciseEvidence instance. If there
// are extensions associated with the provided profileID, they will be
// registered with the instance.
func GetConciseEvidence(profileID *eat.Profile) *ConciseEvidence {
func GetConciseEvidence(profileID *corim.Profile) *ConciseEvidence {
var ret *ConciseEvidence

if profileID == nil {
if profileID.IsNil() {
ret = NewConciseEvidence()
} else {
profileManifest, ok := GetProfileManifest(profileID)
Expand Down
16 changes: 5 additions & 11 deletions coev/tdx/example_pce_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2025 Contributors to the Veraison project.
// Copyright 2025-2026 Contributors to the Veraison project.
// SPDX-License-Identifier: Apache-2.0

package tdx
Expand All @@ -11,9 +11,9 @@ import (

"github.com/veraison/corim/coev"
"github.com/veraison/corim/comid"
"github.com/veraison/corim/corim"
"github.com/veraison/corim/extensions"
"github.com/veraison/corim/profiles/tdx"
"github.com/veraison/eat"
)

func Example_decode_PCE_Evidence_JSON() {
Expand Down Expand Up @@ -113,10 +113,7 @@ func Example_encode_tdx_pce_evidence_without_profile() {
}

func Example_encode_tdx_pce_evidence_with_profile() {
profileID, err := eat.NewProfile("2.16.840.1.113741.1.16.1")
if err != nil {
panic(err) // will not error, as the hard-coded string above is valid
}
profileID := corim.MustNewOIDProfile("2.16.840.1.113741.1.16.1")

manifest, found := coev.GetProfileManifest(profileID)
if !found {
Expand All @@ -136,7 +133,7 @@ func Example_encode_tdx_pce_evidence_with_profile() {
valTriple.Measurements.Add(measurement)
coEv.EvTriples.EvidenceTriples.Add(valTriple)

if err = tdx.SetTdxPceMvalExtensions(tdx.Evidence, &coEv.EvTriples.EvidenceTriples.Values[0].Measurements.Values[0].Val); err != nil {
if err := tdx.SetTdxPceMvalExtensions(tdx.Evidence, &coEv.EvTriples.EvidenceTriples.Values[0].Measurements.Values[0].Val); err != nil {
panic(err)
}

Expand Down Expand Up @@ -170,10 +167,7 @@ var (
)

func Example_decode_PCE_Evidence_CBOR() {
profileID, err := eat.NewProfile("2.16.840.1.113741.1.16.1")
if err != nil {
panic(err) // will not error, as the hard-coded string above is valid
}
profileID := corim.MustNewOIDProfile("2.16.840.1.113741.1.16.1")
manifest, found := coev.GetProfileManifest(profileID)
if !found {
fmt.Printf("Evidence Profile NOT FOUND")
Expand Down
20 changes: 7 additions & 13 deletions coev/tdx/example_qe_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2025 Contributors to the Veraison project.
// Copyright 2025-2026 Contributors to the Veraison project.
// SPDX-License-Identifier: Apache-2.0

package tdx
Expand All @@ -11,9 +11,9 @@ import (

"github.com/veraison/corim/coev"
"github.com/veraison/corim/comid"
"github.com/veraison/corim/corim"
"github.com/veraison/corim/extensions"
"github.com/veraison/corim/profiles/tdx"
"github.com/veraison/eat"
)

func Example_decode_QE_Evidence_JSON() {
Expand Down Expand Up @@ -104,14 +104,11 @@ func Example_encode_tdx_qe_evidence_without_profile() {

// output:
// d9023ba100a1008182a100a300d86f4c6086480186f84d01020304050171496e74656c20436f72706f726174696f6e02703031323334353637383941424344454681a101a538480a385046c000fbff000038538282015820e45b72f5c0c0b572db4d8d3ab7e97f368ff74e62347a824decb67a84e5224d7582075830e45b72f5c0c0b572db4d8d3ab7e97f368ff74e62347a824decb67a84e5224d75e45b72f5c0c0b572db4d8d3ab7e97f3638540138550b
// {"ev-triples":{"evidence-triples":[{"environment":{"class":{"id":{"type":"oid","value":"2.16.840.1.113741.1.2.3.4.5"},"vendor":"Intel Corporation","model":"0123456789ABCDEF"}},"measurements":[{"value":{"isvsvn":{"type":"uint","value":10},"miscselect":"wAD7/wAA","mrsigner":{"type":"digest","value":["sha-256;5Fty9cDAtXLbTY06t+l/No/3TmI0eoJN7LZ6hOUiTXU=","sha-384;5Fty9cDAtXLbTY06t+l/No/3TmI0eoJN7LZ6hOUiTXXkW3L1wMC1cttNjTq36X82"]},"isvprodid":{"type":"uint","value":1},"tcbevalnum":{"type":"uint","value":11}}}]}]}}
// {"ev-triples":{"evidence-triples":[{"environment":{"class":{"id":{"type":"oid","value":"2.16.840.1.113741.1.2.3.4.5"},"vendor":"Intel Corporation","model":"0123456789ABCDEF"}},"measurements":[{"value":{"isvsvn":{"type":"uint","value":10},"miscselect":"wAD7/wAA","mrsigner":{"type":"digest","value":[[1,"5Fty9cDAtXLbTY06t-l_No_3TmI0eoJN7LZ6hOUiTXU"],[7,"5Fty9cDAtXLbTY06t-l_No_3TmI0eoJN7LZ6hOUiTXXkW3L1wMC1cttNjTq36X82"]]},"isvprodid":{"type":"uint","value":1},"tcbevalnum":{"type":"uint","value":11}}}]}]}}
}

func Example_encode_tdx_qe_evidence_with_profile() {
profileID, err := eat.NewProfile("2.16.840.1.113741.1.16.1")
if err != nil {
panic(err) // will not error, as the hard-coded string above is valid
}
profileID := corim.MustNewOIDProfile("2.16.840.1.113741.1.16.1")

manifest, found := coev.GetProfileManifest(profileID)
if !found {
Expand All @@ -131,7 +128,7 @@ func Example_encode_tdx_qe_evidence_with_profile() {
valTriple.Measurements.Add(measurement)
coEv.EvTriples.EvidenceTriples.Add(valTriple)

if err = tdx.SetTdxQeMvalExtensions(tdx.Evidence, &coEv.EvTriples.EvidenceTriples.Values[0].Measurements.Values[0].Val); err != nil {
if err := tdx.SetTdxQeMvalExtensions(tdx.Evidence, &coEv.EvTriples.EvidenceTriples.Values[0].Measurements.Values[0].Val); err != nil {
panic(err)
}

Expand All @@ -156,7 +153,7 @@ func Example_encode_tdx_qe_evidence_with_profile() {

// output:
// d9023ba100a1008182a100a300d86f4c6086480186f84d01020304050171496e74656c20436f72706f726174696f6e02703031323334353637383941424344454681a101a538480a385046c000fbff000038538282015820e45b72f5c0c0b572db4d8d3ab7e97f368ff74e62347a824decb67a84e5224d7582075830e45b72f5c0c0b572db4d8d3ab7e97f368ff74e62347a824decb67a84e5224d75e45b72f5c0c0b572db4d8d3ab7e97f3638540138550b
// {"ev-triples":{"evidence-triples":[{"environment":{"class":{"id":{"type":"oid","value":"2.16.840.1.113741.1.2.3.4.5"},"vendor":"Intel Corporation","model":"0123456789ABCDEF"}},"measurements":[{"value":{"isvsvn":{"type":"uint","value":10},"miscselect":"wAD7/wAA","mrsigner":{"type":"digest","value":["sha-256;5Fty9cDAtXLbTY06t+l/No/3TmI0eoJN7LZ6hOUiTXU=","sha-384;5Fty9cDAtXLbTY06t+l/No/3TmI0eoJN7LZ6hOUiTXXkW3L1wMC1cttNjTq36X82"]},"isvprodid":{"type":"uint","value":1},"tcbevalnum":{"type":"uint","value":11}}}]}]}}
// {"ev-triples":{"evidence-triples":[{"environment":{"class":{"id":{"type":"oid","value":"2.16.840.1.113741.1.2.3.4.5"},"vendor":"Intel Corporation","model":"0123456789ABCDEF"}},"measurements":[{"value":{"isvsvn":{"type":"uint","value":10},"miscselect":"wAD7/wAA","mrsigner":{"type":"digest","value":[[1,"5Fty9cDAtXLbTY06t-l_No_3TmI0eoJN7LZ6hOUiTXU"],[7,"5Fty9cDAtXLbTY06t-l_No_3TmI0eoJN7LZ6hOUiTXXkW3L1wMC1cttNjTq36X82"]]},"isvprodid":{"type":"uint","value":1},"tcbevalnum":{"type":"uint","value":11}}}]}]}}
}

var (
Expand All @@ -165,10 +162,7 @@ var (
)

func Example_decode_QE_Evidence_CBOR() {
profileID, err := eat.NewProfile("2.16.840.1.113741.1.16.1")
if err != nil {
panic(err) // will not error, as the hard-coded string above is valid
}
profileID := corim.MustNewOIDProfile("2.16.840.1.113741.1.16.1")
manifest, found := coev.GetProfileManifest(profileID)
if !found {
fmt.Printf("Evidence Profile NOT FOUND")
Expand Down
20 changes: 7 additions & 13 deletions coev/tdx/example_seam_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2025 Contributors to the Veraison project.
// Copyright 2025-2026 Contributors to the Veraison project.
// SPDX-License-Identifier: Apache-2.0

package tdx
Expand All @@ -11,9 +11,9 @@ import (

"github.com/veraison/corim/coev"
"github.com/veraison/corim/comid"
"github.com/veraison/corim/corim"
"github.com/veraison/corim/extensions"
"github.com/veraison/corim/profiles/tdx"
"github.com/veraison/eat"
)

func Example_decode_Seam_Evidence_JSON() {
Expand Down Expand Up @@ -101,7 +101,7 @@ func Example_encode_tdx_seam_evidence_without_profile() {

// output:
// d9023ba100a1008182a100a300d86f4c6086480186f84d01020304030171496e74656c20436f72706f726174696f6e02675444585345414d81a101a73847c11a6796cc8038480a385142010138528182015820e45b72f5c0c0b572db4d8d3ab7e97f368ff74e62347a824decb67a84e5224d7538538282015820e45b72f5c0c0b572db4d8d3ab7e97f368ff74e62347a824decb67a84e5224d7582075830e45b72f5c0c0b572db4d8d3ab7e97f368ff74e62347a824decb67a84e5224d75e45b72f5c0c0b572db4d8d3ab7e97f36385442010138550b
// {"ev-triples":{"evidence-triples":[{"environment":{"class":{"id":{"type":"oid","value":"2.16.840.1.113741.1.2.3.4.3"},"vendor":"Intel Corporation","model":"TDXSEAM"}},"measurements":[{"value":{"tcbdate":"2025-01-27T00:00:00Z","isvsvn":{"type":"uint","value":10},"attributes":"AQE=","mrtee":{"type":"digest","value":["sha-256;5Fty9cDAtXLbTY06t+l/No/3TmI0eoJN7LZ6hOUiTXU="]},"mrsigner":{"type":"digest","value":["sha-256;5Fty9cDAtXLbTY06t+l/No/3TmI0eoJN7LZ6hOUiTXU=","sha-384;5Fty9cDAtXLbTY06t+l/No/3TmI0eoJN7LZ6hOUiTXXkW3L1wMC1cttNjTq36X82"]},"isvprodid":{"type":"bytes","value":"AQE="},"tcbevalnum":{"type":"uint","value":11}}}]}]}}
// {"ev-triples":{"evidence-triples":[{"environment":{"class":{"id":{"type":"oid","value":"2.16.840.1.113741.1.2.3.4.3"},"vendor":"Intel Corporation","model":"TDXSEAM"}},"measurements":[{"value":{"tcbdate":"2025-01-27T00:00:00Z","isvsvn":{"type":"uint","value":10},"attributes":"AQE=","mrtee":{"type":"digest","value":[[1,"5Fty9cDAtXLbTY06t-l_No_3TmI0eoJN7LZ6hOUiTXU"]]},"mrsigner":{"type":"digest","value":[[1,"5Fty9cDAtXLbTY06t-l_No_3TmI0eoJN7LZ6hOUiTXU"],[7,"5Fty9cDAtXLbTY06t-l_No_3TmI0eoJN7LZ6hOUiTXXkW3L1wMC1cttNjTq36X82"]]},"isvprodid":{"type":"bytes","value":"AQE="},"tcbevalnum":{"type":"uint","value":11}}}]}]}}
}

var (
Expand All @@ -110,10 +110,7 @@ var (
)

func Example_encode_tdx_seam_evidence_with_profile() {
profileID, err := eat.NewProfile("2.16.840.1.113741.1.16.1")
if err != nil {
panic(err) // will not error, as the hard-coded string above is valid
}
profileID := corim.MustNewOIDProfile("2.16.840.1.113741.1.16.1")

manifest, found := coev.GetProfileManifest(profileID)
if !found {
Expand All @@ -132,7 +129,7 @@ func Example_encode_tdx_seam_evidence_with_profile() {
valTriple.Measurements.Add(measurement)
coEv.EvTriples.EvidenceTriples.Add(valTriple)

if err = tdx.SetTDXSeamMvalExtensions(tdx.Evidence, &coEv.EvTriples.EvidenceTriples.Values[0].Measurements.Values[0].Val); err != nil {
if err := tdx.SetTDXSeamMvalExtensions(tdx.Evidence, &coEv.EvTriples.EvidenceTriples.Values[0].Measurements.Values[0].Val); err != nil {
panic(err)
}

Expand All @@ -157,14 +154,11 @@ func Example_encode_tdx_seam_evidence_with_profile() {

// output:
// d9023ba100a1008182a100a300d86f4c6086480186f84d01020304030171496e74656c20436f72706f726174696f6e02675444585345414d81a101a73847c11a6796cc8038480a385142010138528182015820e45b72f5c0c0b572db4d8d3ab7e97f368ff74e62347a824decb67a84e5224d7538538282015820e45b72f5c0c0b572db4d8d3ab7e97f368ff74e62347a824decb67a84e5224d7582075830e45b72f5c0c0b572db4d8d3ab7e97f368ff74e62347a824decb67a84e5224d75e45b72f5c0c0b572db4d8d3ab7e97f36385442010138550b
// {"ev-triples":{"evidence-triples":[{"environment":{"class":{"id":{"type":"oid","value":"2.16.840.1.113741.1.2.3.4.3"},"vendor":"Intel Corporation","model":"TDXSEAM"}},"measurements":[{"value":{"tcbdate":"2025-01-27T00:00:00Z","isvsvn":{"type":"uint","value":10},"attributes":"AQE=","mrtee":{"type":"digest","value":["sha-256;5Fty9cDAtXLbTY06t+l/No/3TmI0eoJN7LZ6hOUiTXU="]},"mrsigner":{"type":"digest","value":["sha-256;5Fty9cDAtXLbTY06t+l/No/3TmI0eoJN7LZ6hOUiTXU=","sha-384;5Fty9cDAtXLbTY06t+l/No/3TmI0eoJN7LZ6hOUiTXXkW3L1wMC1cttNjTq36X82"]},"isvprodid":{"type":"bytes","value":"AQE="},"tcbevalnum":{"type":"uint","value":11}}}]}]}}
// {"ev-triples":{"evidence-triples":[{"environment":{"class":{"id":{"type":"oid","value":"2.16.840.1.113741.1.2.3.4.3"},"vendor":"Intel Corporation","model":"TDXSEAM"}},"measurements":[{"value":{"tcbdate":"2025-01-27T00:00:00Z","isvsvn":{"type":"uint","value":10},"attributes":"AQE=","mrtee":{"type":"digest","value":[[1,"5Fty9cDAtXLbTY06t-l_No_3TmI0eoJN7LZ6hOUiTXU"]]},"mrsigner":{"type":"digest","value":[[1,"5Fty9cDAtXLbTY06t-l_No_3TmI0eoJN7LZ6hOUiTXU"],[7,"5Fty9cDAtXLbTY06t-l_No_3TmI0eoJN7LZ6hOUiTXXkW3L1wMC1cttNjTq36X82"]]},"isvprodid":{"type":"bytes","value":"AQE="},"tcbevalnum":{"type":"uint","value":11}}}]}]}}
}

func Example_decode_CBOR() {
profileID, err := eat.NewProfile("2.16.840.1.113741.1.16.1")
if err != nil {
panic(err) // will not error, as the hard-coded string above is valid
}
profileID := corim.MustNewOIDProfile("2.16.840.1.113741.1.16.1")
manifest, found := coev.GetProfileManifest(profileID)
if !found {
fmt.Printf("Evidence Profile NOT FOUND")
Expand Down
Loading
Loading