Skip to content

Commit 772ab5e

Browse files
Yogesh's review comments
Signed-off-by: Thomas Fossati <[email protected]>
1 parent e808b88 commit 772ab5e

File tree

11 files changed

+19
-14
lines changed

11 files changed

+19
-14
lines changed

coserv/cmd/coserv-service/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 Contributors to the Veraison project.
1+
# Copyright 2025 Contributors to the Veraison project.
22
# SPDX-License-Identifier: Apache-2.0
33

44
.DEFAULT_GOAL := all

coserv/endorsementdistributor/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 Contributors to the Veraison project.
1+
# Copyright 2025 Contributors to the Veraison project.
22
# SPDX-License-Identifier: Apache-2.0
33

44
.DEFAULT_GOAL := test

coserv/endorsementdistributor/iendorsementdistributor.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,19 @@ package endorsementdistributor
55

66
import "github.com/veraison/services/proto"
77

8+
// IEndorsementDistributor provides the bridge between the coserv REST API
9+
// handler and VTS gRPC service endpoints relevant to endorsement distribution.
810
type IEndorsementDistributor interface {
911
// SupportedMediaTypes returns a list of supported media types
1012
SupportedMediaTypes() ([]string, error)
1113

1214
// GetEndorsements retrieves endorsements matching the given query
13-
// for the given tenantID, formatted as specified by resultMediaType
15+
// for the given tenantID, formatted as specified by mediaType
1416
// (which must be one of the media types returned by SupportedMediaTypes())
1517
//
16-
// If no endorsement can be found matching the query, an empty result set
18+
// If no endorsements can be found matching the query, an empty result set
1719
// is returned with no error.
18-
GetEndorsements(tenantID string, query string, resultMediaType string) ([]byte, error)
20+
GetEndorsements(tenantID string, query string, mediaType string) ([]byte, error)
1921

2022
// GetPublicKey returns the public key used to sign CoSERV responses
2123
// (if any). If no signing is performed, nil is returned.

proto/endorsement_query.proto

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ option go_package = "github.com/veraison/services/proto";
1212
message EndorsementQueryIn {
1313
// media type (including profile)
1414
string media_type = 1;
15-
// base64url-encoded CoSERV
15+
// base64url-encoded CoSERV query
1616
string query = 2;
1717
}
1818

1919
message EndorsementQueryOut {
2020
Status status = 1;
21+
// CBOR-encoded CoSERV result set
2122
bytes result_set = 2;
2223
}

scheme/amd-kds-coserv/coserv_handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ func (s CoservProxyHandler) GetEndorsements(tenantID string, query string) ([]by
129129
// Begin with an empty result set
130130
coservResult := *coserv.NewResultSet()
131131

132-
// Loop over all of the class environments in the query, and call the AMD KDS cloud service for each one.
132+
// Loop over all of the instance environments in the query, and call the AMD KDS cloud service for each one.
133133
for _, i := range *q.Query.EnvironmentSelector.Instances {
134134
err := s.addTrustAnchorForInstance(&i, &coservResult)
135135
if err != nil {

scheme/nvidia-coserv/coserv_handler.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,15 @@ func callRimService(rimid *string) (*RimServiceResponse, error) {
8282

8383
func (s CoservProxyHandler) addReferenceValuesForClass(query *coserv.Query, c *coserv.StatefulClass, results *coserv.ResultSet) error {
8484
if *c.Class.Vendor != "NVIDIA" {
85-
return fmt.Errorf("vendors other than NVIDIA not supported by this proxy plug-in")
85+
return errors.New("vendors other than NVIDIA not supported by this proxy plug-in")
8686
}
8787

8888
if c.Measurements != nil {
89-
return fmt.Errorf("NVIDIA CoSERV proxy plug-in does not expect stateful class environments")
89+
return errors.New("NVIDIA CoSERV proxy plug-in does not expect stateful class environments")
9090
}
9191

9292
if c.Class.Model == nil {
93-
return fmt.Errorf("no Model field supplied in NVIDIA class environment")
93+
return errors.New("no Model field supplied in NVIDIA class environment")
9494
}
9595

9696
rimid := c.Class.Model

scheme/nvidia-coserv/plugin/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Copyright 2025 Contributors to the Veraison project.
2+
# SPDX-License-Identifier: Apache-2.0
13

24
ifndef COMBINED_PLUGINS
35
SUBDIR += coserv-handler

scheme/parsec-cca/endorsement_handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,5 @@ func (o EndorsementHandler) Decode(data []byte, mediaType string, caCertPool []b
5252
}
5353

5454
func (o EndorsementHandler) CoservRepackage(coservQuery string, resultSet []string) ([]byte, error) {
55-
return nil, errors.New("TODO")
55+
return nil, errors.New("Parsec CCA CoservRepackage not implemented")
5656
}

scheme/parsec-tpm/endorsement_handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,5 @@ func (o EndorsementHandler) Decode(data []byte, mediaType string, caCertPool []b
5353
}
5454

5555
func (o EndorsementHandler) CoservRepackage(coservQuery string, resultSet []string) ([]byte, error) {
56-
return nil, errors.New("TODO")
56+
return nil, errors.New("Parsec TPM CoservRepackage not implemented")
5757
}

scheme/psa-iot/endorsement_handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,5 @@ func (o EndorsementHandler) Decode(data []byte, mediaType string, caCertPool []b
5353
}
5454

5555
func (o EndorsementHandler) CoservRepackage(coservQuery string, resultSet []string) ([]byte, error) {
56-
return nil, errors.New("TODO")
56+
return nil, errors.New("PSA-IoT CoservRepackage not implemented")
5757
}

0 commit comments

Comments
 (0)