Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 3 additions & 3 deletions coev/coswid_evidence.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (

// CoSWIDEvidenceMap is the Map to carry CoSWID Evidence
type CoSWIDEvidenceMap struct {
TagID *swid.TagID `cbor:"0,keyasint,omitempty" json:"tagId,omitempty"`
Evidence swid.Evidence `cbor:"1,keyasint,omitempty" json:"evidence,omitempty"`
AuthorizedBy *comid.CryptoKey `cbor:"2,keyasint,omitempty" json:"authorized-by,omitempty"`
TagID *swid.TagID `cbor:"0,keyasint,omitempty" json:"tagId,omitempty"`
Evidence swid.Evidence `cbor:"1,keyasint,omitempty" json:"evidence,omitempty"`
AuthorizedBy *comid.CryptoKeys `cbor:"2,keyasint,omitempty" json:"authorized-by,omitempty"`
}

type CoSWIDEvidence []CoSWIDEvidenceMap
Expand Down
10 changes: 6 additions & 4 deletions coev/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,12 @@ func Example_decode_JSON() {
"raw-value-mask": "/////w==",
"mac-addr": "02:00:5e:10:00:00:00:02"
},
"authorized-by": {
"type": "pkix-base64-key",
"value": "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFn0taoAwR3PmrKkYLtAsD9o05KSM6mbgfNCgpuL0g6VpTHkZl73wk5BDxoV7n+Oeee0iIqkW3HMZT3ETiniJdg==\n-----END PUBLIC KEY-----"
}
"authorized-by": [
{
"type": "pkix-base64-key",
"value": "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFn0taoAwR3PmrKkYLtAsD9o05KSM6mbgfNCgpuL0g6VpTHkZl73wk5BDxoV7n+Oeee0iIqkW3HMZT3ETiniJdg==\n-----END PUBLIC KEY-----"
}
]
}
]
}
Expand Down
5 changes: 2 additions & 3 deletions coev/tdx/example_pce_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,9 @@ func Example_decode_PCE_Evidence_CBOR() {
// ISVSVN: 0
// ISVSVN: 0
// ISVSVN: 0
// CryptoKey Type: pkix-base64-key
// CryptoKey Value: -----BEGIN PUBLIC KEY-----
// CryptoKeys: [-----BEGIN PUBLIC KEY-----
// MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFn0taoAwR3PmrKkYLtAsD9o05KSM6mbgfNCgpuL0g6VpTHkZl73wk5BDxoV7n+Oeee0iIqkW3HMZT3ETiniJdg==
// -----END PUBLIC KEY-----
// -----END PUBLIC KEY-----]
}

func ExtractPceEvidence(ce *coev.TaggedConciseEvidence) error {
Expand Down
10 changes: 4 additions & 6 deletions coev/tdx/example_qe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,9 @@ func Example_decode_QE_Evidence_JSON() {
// TEE TCB Status = UpToDate
// Tee AdvisoryID = INTEL-SA-00078
// Tee AdvisoryID = INTEL-SA-00079
// CryptoKey Type: pkix-base64-key
// CryptoKey Value: -----BEGIN PUBLIC KEY-----
// CryptoKeys: [-----BEGIN PUBLIC KEY-----
// MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFn0taoAwR3PmrKkYLtAsD9o05KSM6mbgfNCgpuL0g6VpTHkZl73wk5BDxoV7n+Oeee0iIqkW3HMZT3ETiniJdg==
// -----END PUBLIC KEY-----
// -----END PUBLIC KEY-----]
}

func Example_encode_tdx_qe_evidence_without_profile() {
Expand Down Expand Up @@ -201,10 +200,9 @@ func Example_decode_QE_Evidence_CBOR() {
// TEE TCB Status = UpToDate
// Tee AdvisoryID = INTEL-SA-00078
// Tee AdvisoryID = INTEL-SA-00079
// CryptoKey Type: pkix-base64-key
// CryptoKey Value: -----BEGIN PUBLIC KEY-----
// CryptoKeys: [-----BEGIN PUBLIC KEY-----
// MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFn0taoAwR3PmrKkYLtAsD9o05KSM6mbgfNCgpuL0g6VpTHkZl73wk5BDxoV7n+Oeee0iIqkW3HMZT3ETiniJdg==
// -----END PUBLIC KEY-----
// -----END PUBLIC KEY-----]
}

func ExtractQeEvidence(ce *coev.TaggedConciseEvidence) error {
Expand Down
5 changes: 2 additions & 3 deletions coev/tdx/example_seam_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,9 @@ func Example_decode_CBOR() {
// mrsigner Digest Value: e45b72f5c0c0b572db4d8d3ab7e97f368ff74e62347a824decb67a84e5224d75
// mrsigner Digest Alg: 7
// mrsigner Digest Value: e45b72f5c0c0b572db4d8d3ab7e97f368ff74e62347a824decb67a84e5224d75e45b72f5c0c0b572db4d8d3ab7e97f36
// CryptoKey Type: pkix-base64-key
// CryptoKey Value: -----BEGIN PUBLIC KEY-----
// CryptoKeys: [-----BEGIN PUBLIC KEY-----
// MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFn0taoAwR3PmrKkYLtAsD9o05KSM6mbgfNCgpuL0g6VpTHkZl73wk5BDxoV7n+Oeee0iIqkW3HMZT3ETiniJdg==
// -----END PUBLIC KEY-----
// -----END PUBLIC KEY-----]
}

func ExtractSeamEvidence(ce *coev.TaggedConciseEvidence) error {
Expand Down
10 changes: 6 additions & 4 deletions coev/tdx/test_vars.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,12 @@ var (
]
}
},
"authorized-by": {
"type": "pkix-base64-key",
"value": "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFn0taoAwR3PmrKkYLtAsD9o05KSM6mbgfNCgpuL0g6VpTHkZl73wk5BDxoV7n+Oeee0iIqkW3HMZT3ETiniJdg==\n-----END PUBLIC KEY-----"
}
"authorized-by": [
{
"type": "pkix-base64-key",
"value": "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFn0taoAwR3PmrKkYLtAsD9o05KSM6mbgfNCgpuL0g6VpTHkZl73wk5BDxoV7n+Oeee0iIqkW3HMZT3ETiniJdg==\n-----END PUBLIC KEY-----"
}
]
}
]
}
Expand Down
Binary file modified coev/tdx/testcases/ce-pce-evidence.cbor
Binary file not shown.
Binary file modified coev/tdx/testcases/ce-qe-evidence.cbor
Binary file not shown.
Binary file modified coev/tdx/testcases/ce-seam-evidence.cbor
Binary file not shown.
4 changes: 3 additions & 1 deletion coev/tdx/testcases/src/ce-pce-evidence.diag
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
],
/ pceid / -80 : "0000"
},
/ authorized-by / 2 : 554("-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFn0taoAwR3PmrKkYLtAsD9o05KSM6mbgfNCgpuL0g6VpTHkZl73wk5BDxoV7n+Oeee0iIqkW3HMZT3ETiniJdg==\n-----END PUBLIC KEY-----")
/ authorized-by / 2 : [
554("-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFn0taoAwR3PmrKkYLtAsD9o05KSM6mbgfNCgpuL0g6VpTHkZl73wk5BDxoV7n+Oeee0iIqkW3HMZT3ETiniJdg==\n-----END PUBLIC KEY-----")
]
}
]
]
Expand Down
4 changes: 3 additions & 1 deletion coev/tdx/testcases/src/ce-qe-evidence.diag
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
"UpToDate"
]
},
/ authorized-by / 2 : 554("-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFn0taoAwR3PmrKkYLtAsD9o05KSM6mbgfNCgpuL0g6VpTHkZl73wk5BDxoV7n+Oeee0iIqkW3HMZT3ETiniJdg==\n-----END PUBLIC KEY-----")
/ authorized-by / 2 : [
554("-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFn0taoAwR3PmrKkYLtAsD9o05KSM6mbgfNCgpuL0g6VpTHkZl73wk5BDxoV7n+Oeee0iIqkW3HMZT3ETiniJdg==\n-----END PUBLIC KEY-----")
]
}
]
]
Expand Down
2 changes: 1 addition & 1 deletion coev/tdx/testcases/src/ce-seam-evidence.diag
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
],
/ tcb-eval-num / -86 : 11
},
2 : 554("-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFn0taoAwR3PmrKkYLtAsD9o05KSM6mbgfNCgpuL0g6VpTHkZl73wk5BDxoV7n+Oeee0iIqkW3HMZT3ETiniJdg==\n-----END PUBLIC KEY-----")
2 : [554("-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFn0taoAwR3PmrKkYLtAsD9o05KSM6mbgfNCgpuL0g6VpTHkZl73wk5BDxoV7n+Oeee0iIqkW3HMZT3ETiniJdg==\n-----END PUBLIC KEY-----")]
}
]
]
Expand Down
17 changes: 17 additions & 0 deletions comid/cryptokeys.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,20 @@
}
return nil
}

// String returns a string representation of all CryptoKeys
func (o CryptoKeys) String() string {
if len(o) == 0 {
return "[]"
}

Check failure on line 44 in comid/cryptokeys.go

View workflow job for this annotation

GitHub Actions / Lint

File is not properly formatted (gofmt)
result := "["
for i, key := range o {
if i > 0 {
result += ", "
}
result += key.String()
}
result += "]"
return result
}
6 changes: 3 additions & 3 deletions comid/measurement.go
Original file line number Diff line number Diff line change
Expand Up @@ -493,9 +493,9 @@ func (o Mval) Valid() error {

// Measurement stores a measurement-map with CBOR and JSON serializations.
type Measurement struct {
Key *Mkey `cbor:"0,keyasint,omitempty" json:"key,omitempty"`
Val Mval `cbor:"1,keyasint" json:"value"`
AuthorizedBy *CryptoKey `cbor:"2,keyasint,omitempty" json:"authorized-by,omitempty"`
Key *Mkey `cbor:"0,keyasint,omitempty" json:"key,omitempty"`
Val Mval `cbor:"1,keyasint" json:"value"`
AuthorizedBy *CryptoKeys `cbor:"2,keyasint,omitempty" json:"authorized-by,omitempty"`
}

func NewMeasurement(val any, typ string) (*Measurement, error) {
Expand Down
10 changes: 4 additions & 6 deletions comid/tdx/example_pce_refval_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,9 @@ func Example_decode_PCE_JSON() {
// SVN Value: 10
// SVN Operator: greater_or_equal
// SVN Value: 10
// CryptoKey Type: pkix-base64-key
// CryptoKey Value: -----BEGIN PUBLIC KEY-----
// CryptoKeys: [-----BEGIN PUBLIC KEY-----
// MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFn0taoAwR3PmrKkYLtAsD9o05KSM6mbgfNCgpuL0g6VpTHkZl73wk5BDxoV7n+Oeee0iIqkW3HMZT3ETiniJdg==
// -----END PUBLIC KEY-----
// -----END PUBLIC KEY-----]
}

func extractPCERefVals(c *comid.Comid) error {
Expand Down Expand Up @@ -166,10 +165,9 @@ func Example_decode_PCE_CBOR() {
// SVN Value: 0
// SVN Operator: greater_or_equal
// SVN Value: 0
// CryptoKey Type: pkix-base64-key
// CryptoKey Value: -----BEGIN PUBLIC KEY-----
// CryptoKeys: [-----BEGIN PUBLIC KEY-----
// MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFn0taoAwR3PmrKkYLtAsD9o05KSM6mbgfNCgpuL0g6VpTHkZl73wk5BDxoV7n+Oeee0iIqkW3HMZT3ETiniJdg==
// -----END PUBLIC KEY-----
// -----END PUBLIC KEY-----]
}

func Example_encode_tdx_pce_refval_with_profile() {
Expand Down
10 changes: 4 additions & 6 deletions comid/tdx/example_qe_refval_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,9 @@ func Example_decode_QE_JSON() {
// Tee AdvisoryID = SA-00078
// Tee AdvisoryID = SA-00077
// Tee AdvisoryID = SA-00079
// CryptoKey Type: pkix-base64-key
// CryptoKey Value: -----BEGIN PUBLIC KEY-----
// CryptoKeys: [-----BEGIN PUBLIC KEY-----
// MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFn0taoAwR3PmrKkYLtAsD9o05KSM6mbgfNCgpuL0g6VpTHkZl73wk5BDxoV7n+Oeee0iIqkW3HMZT3ETiniJdg==
// -----END PUBLIC KEY-----
// -----END PUBLIC KEY-----]
}

func extractQERefVals(c *comid.Comid) error {
Expand Down Expand Up @@ -174,8 +173,7 @@ func Example_decode_QE_CBOR() {
// TeeAdvisory Operator: member
// Tee AdvisoryID = INTEL-SA-00078
// Tee AdvisoryID = INTEL-SA-00079
// CryptoKey Type: pkix-base64-key
// CryptoKey Value: -----BEGIN PUBLIC KEY-----
// CryptoKeys: [-----BEGIN PUBLIC KEY-----
// MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFn0taoAwR3PmrKkYLtAsD9o05KSM6mbgfNCgpuL0g6VpTHkZl73wk5BDxoV7n+Oeee0iIqkW3HMZT3ETiniJdg==
// -----END PUBLIC KEY-----
// -----END PUBLIC KEY-----]
}
10 changes: 4 additions & 6 deletions comid/tdx/example_seam_refval_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,9 @@ func Example_decode_JSON() {
// mrsigner Digest Value: 87428fc522803d31065e7bce3cf03fe475096631e5e07bbd7a0fde60c4cf25c7
// mrsigner Digest Alg: 8
// mrsigner Digest Value: a314fc2dc663ae7a6b6bc6787594057396e6b3f569cd50fd5ddb4d1bbafd2b6aa314fc2dc663ae7a6b6bc6787594057396e6b3f569cd50fd5ddb4d1bbafd2b6a
// CryptoKey Type: pkix-base64-key
// CryptoKey Value: -----BEGIN PUBLIC KEY-----
// CryptoKeys: [-----BEGIN PUBLIC KEY-----
// MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFn0taoAwR3PmrKkYLtAsD9o05KSM6mbgfNCgpuL0g6VpTHkZl73wk5BDxoV7n+Oeee0iIqkW3HMZT3ETiniJdg==
// -----END PUBLIC KEY-----
// -----END PUBLIC KEY-----]
}

func Example_encode_tdx_seam_refval_without_profile() {
Expand Down Expand Up @@ -268,10 +267,9 @@ func Example_decode_CBOR() {
// mrsigner Digest Value: a314fc2dc663ae7a6b6bc6787594057396e6b3f569cd50fd5ddb4d1bbafd2b6a
// mrsigner Digest Alg: 8
// mrsigner Digest Value: a314fc2dc663ae7a6b6bc6787594057396e6b3f569cd50fd5ddb4d1bbafd2b6aa314fc2dc663ae7a6b6bc6787594057396e6b3f569cd50fd5ddb4d1bbafd2b6a
// CryptoKey Type: pkix-base64-key
// CryptoKey Value: -----BEGIN PUBLIC KEY-----
// CryptoKeys: [-----BEGIN PUBLIC KEY-----
// MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFn0taoAwR3PmrKkYLtAsD9o05KSM6mbgfNCgpuL0g6VpTHkZl73wk5BDxoV7n+Oeee0iIqkW3HMZT3ETiniJdg==
// -----END PUBLIC KEY-----
// -----END PUBLIC KEY-----]

}

Expand Down
8 changes: 5 additions & 3 deletions comid/tdx/test_common_methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,13 @@ func extractTeeTcbEvalNum(tcbEvalNum *TeeTcbEvalNumber) error {
}

func decodeAuthorisedBy(m *comid.Measurement) error {
if m.AuthorizedBy == nil {
return fmt.Errorf("no authorized-by keys")
}
if err := m.AuthorizedBy.Valid(); err != nil {
return fmt.Errorf("invalid cryptokey: %w", err)
return fmt.Errorf("invalid cryptokeys: %w", err)
}
fmt.Printf("\nCryptoKey Type: %s", m.AuthorizedBy.Type())
fmt.Printf("\nCryptoKey Value: %s", m.AuthorizedBy.String())
fmt.Printf("\nCryptoKeys: %s", m.AuthorizedBy.String())
return nil
}

Expand Down
30 changes: 18 additions & 12 deletions comid/tdx/test_vars.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,12 @@ const (
],
"pceid": "0000"
},
"authorized-by": {
"type": "pkix-base64-key",
"value": "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFn0taoAwR3PmrKkYLtAsD9o05KSM6mbgfNCgpuL0g6VpTHkZl73wk5BDxoV7n+Oeee0iIqkW3HMZT3ETiniJdg==\n-----END PUBLIC KEY-----"
}
"authorized-by": [
{
"type": "pkix-base64-key",
"value": "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFn0taoAwR3PmrKkYLtAsD9o05KSM6mbgfNCgpuL0g6VpTHkZl73wk5BDxoV7n+Oeee0iIqkW3HMZT3ETiniJdg==\n-----END PUBLIC KEY-----"
}
]
}
]
}
Expand Down Expand Up @@ -305,10 +307,12 @@ const (
}
}
},
"authorized-by": {
"type": "pkix-base64-key",
"value": "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFn0taoAwR3PmrKkYLtAsD9o05KSM6mbgfNCgpuL0g6VpTHkZl73wk5BDxoV7n+Oeee0iIqkW3HMZT3ETiniJdg==\n-----END PUBLIC KEY-----"
}
"authorized-by": [
{
"type": "pkix-base64-key",
"value": "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFn0taoAwR3PmrKkYLtAsD9o05KSM6mbgfNCgpuL0g6VpTHkZl73wk5BDxoV7n+Oeee0iIqkW3HMZT3ETiniJdg==\n-----END PUBLIC KEY-----"
}
]
}
]
}
Expand Down Expand Up @@ -394,10 +398,12 @@ const (
}
}
},
"authorized-by": {
"type": "pkix-base64-key",
"value": "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFn0taoAwR3PmrKkYLtAsD9o05KSM6mbgfNCgpuL0g6VpTHkZl73wk5BDxoV7n+Oeee0iIqkW3HMZT3ETiniJdg==\n-----END PUBLIC KEY-----"
}
"authorized-by": [
{
"type": "pkix-base64-key",
"value": "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFn0taoAwR3PmrKkYLtAsD9o05KSM6mbgfNCgpuL0g6VpTHkZl73wk5BDxoV7n+Oeee0iIqkW3HMZT3ETiniJdg==\n-----END PUBLIC KEY-----"
}
]
}
]
}
Expand Down
Binary file modified comid/tdx/testcases/comid_pce_refval.cbor
Binary file not shown.
Binary file modified comid/tdx/testcases/comid_qe_refval.cbor
Binary file not shown.
Binary file modified comid/tdx/testcases/comid_seam_refval.cbor
Binary file not shown.
4 changes: 3 additions & 1 deletion comid/tdx/testcases/src/comid_pce_refval.diag
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@
],
/ pceid / -80 : "0000"
},
/ authorized-by / 2: 554("-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFn0taoAwR3PmrKkYLtAsD9o05KSM6mbgfNCgpuL0g6VpTHkZl73wk5BDxoV7n+Oeee0iIqkW3HMZT3ETiniJdg==\n-----END PUBLIC KEY-----")
/ authorized-by / 2: [
554("-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFn0taoAwR3PmrKkYLtAsD9o05KSM6mbgfNCgpuL0g6VpTHkZl73wk5BDxoV7n+Oeee0iIqkW3HMZT3ETiniJdg==\n-----END PUBLIC KEY-----")
]
}
]
] ]
Expand Down
4 changes: 3 additions & 1 deletion comid/tdx/testcases/src/comid_qe_refval.diag
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@
/ advisory-ids / -89 : 60021([ /member/ 6, [ "INTEL-SA-00078", "INTEL-SA-00079" ]]),
/ tcbstatus / -88 : 60021([ /member/ 6, [ "UpToDate" ]])
},
/ authorized-by / 2: 554("-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFn0taoAwR3PmrKkYLtAsD9o05KSM6mbgfNCgpuL0g6VpTHkZl73wk5BDxoV7n+Oeee0iIqkW3HMZT3ETiniJdg==\n-----END PUBLIC KEY-----")
/ authorized-by / 2: [
554("-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFn0taoAwR3PmrKkYLtAsD9o05KSM6mbgfNCgpuL0g6VpTHkZl73wk5BDxoV7n+Oeee0iIqkW3HMZT3ETiniJdg==\n-----END PUBLIC KEY-----")
]
}
]
] ]
Expand Down
2 changes: 1 addition & 1 deletion comid/tdx/testcases/src/comid_seam_refval.diag
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
]),
/ tcb-eval-num / -86 : 60010([ / op.ge / 2, 11 ])
},
2: 554("-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFn0taoAwR3PmrKkYLtAsD9o05KSM6mbgfNCgpuL0g6VpTHkZl73wk5BDxoV7n+Oeee0iIqkW3HMZT3ETiniJdg==\n-----END PUBLIC KEY-----")
2: [554("-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFn0taoAwR3PmrKkYLtAsD9o05KSM6mbgfNCgpuL0g6VpTHkZl73wk5BDxoV7n+Oeee0iIqkW3HMZT3ETiniJdg==\n-----END PUBLIC KEY-----")]
}
]
] ]
Expand Down
Empty file modified comid/testcases/regen-from-src.sh
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions coserv/quads.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
import "github.com/veraison/corim/comid"

type RefValQuad struct {
Authorities *[]comid.CryptoKey `cbor:"1,keyasint"`
Authorities *comid.CryptoKeys `cbor:"1,keyasint"`

Check failure on line 9 in coserv/quads.go

View workflow job for this annotation

GitHub Actions / Lint

File is not properly formatted (gofmt)
RVTriple *comid.ValueTriple `cbor:"2,keyasint"`
}

type AKQuad struct {
Authorities *[]comid.CryptoKey `cbor:"1,keyasint"`
Authorities *comid.CryptoKeys `cbor:"1,keyasint"`
AKTriple *comid.KeyTriple `cbor:"2,keyasint"`
}
2 changes: 1 addition & 1 deletion coserv/resultset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func TestResultSet_AddAttestationKeys(t *testing.T) {
require.NoError(t, err)

akq := AKQuad{
Authorities: &[]comid.CryptoKey{*authority},
Authorities: comid.NewCryptoKeys().Add(authority),
AKTriple: &comid.KeyTriple{
Environment: comid.Environment{
Class: comid.NewClassBytes(testBytes),
Expand Down
2 changes: 1 addition & 1 deletion coserv/test_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func exampleReferenceValuesResultSet(t *testing.T) *ResultSet {
require.NoError(t, err)

rvq := RefValQuad{
Authorities: &[]comid.CryptoKey{*authority},
Authorities: comid.NewCryptoKeys().Add(authority),
RVTriple: &refval,
}

Expand Down
Loading