Skip to content

Commit

Permalink
Add SupportedCiphersuites to interop harness
Browse files Browse the repository at this point in the history
  • Loading branch information
bifurcation committed Mar 8, 2021
1 parent f4fb96e commit 3642dc3
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion interop/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import (
"google.golang.org/grpc/status"

pb "github.com/mlswg/mls-implementations/interop/proto"

"github.com/cisco/go-mls/v0/mls"
)

var (
Expand All @@ -34,7 +36,15 @@ func (mc *MockClient) Name(ctx context.Context, req *pb.NameRequest) (*pb.NameRe
}

func (mc *MockClient) SupportedCiphersuites(ctx context.Context, req *pb.SupportedCiphersuitesRequest) (*pb.SupportedCiphersuitesResponse, error) {
return nil, status.Error(codes.Unimplemented, "Method not implemented")
resp := &pb.SupportedCiphersuitesResponse{
Ciphersuites: make([]uint32, len(mls.AllSupportedCiphersuites)),
}

for i, id := range mls.AllSupportedCiphersuites {
resp.Ciphersuites[i] = uint32(id)
}

return resp, nil
}

func (mc *MockClient) GenerateTestVector(ctx context.Context, req *pb.GenerateTestVectorRequest) (*pb.GenerateTestVectorResponse, error) {
Expand Down

0 comments on commit 3642dc3

Please sign in to comment.