diff --git a/proto/signer.pb.go b/proto/signer.pb.go index ce30950610..c7ccd824ff 100644 --- a/proto/signer.pb.go +++ b/proto/signer.pb.go @@ -94,8 +94,9 @@ func (m *PublicKey) GetKeyInfo() *KeyInfo { // Signature specifies a KeyInfo that was used for signing and signed content type Signature struct { - KeyInfo *KeyInfo `protobuf:"bytes,1,opt,name=keyInfo" json:"keyInfo,omitempty"` - Content []byte `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"` + KeyInfo *KeyInfo `protobuf:"bytes,1,opt,name=keyInfo" json:"keyInfo,omitempty"` + Algorithm *Algorithm `protobuf:"bytes,2,opt,name=algorithm" json:"algorithm,omitempty"` + Content []byte `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"` } func (m *Signature) Reset() { *m = Signature{} } @@ -109,6 +110,13 @@ func (m *Signature) GetKeyInfo() *KeyInfo { return nil } +func (m *Signature) GetAlgorithm() *Algorithm { + if m != nil { + return m.Algorithm + } + return nil +} + // SignatureRequests specifies a KeyInfo, and content to be signed type SignatureRequest struct { KeyID *KeyID `protobuf:"bytes,1,opt,name=keyID" json:"keyID,omitempty"` diff --git a/signer/api/rpc_api.go b/signer/api/rpc_api.go index 67f2183f67..49f31b1953 100644 --- a/signer/api/rpc_api.go +++ b/signer/api/rpc_api.go @@ -113,7 +113,7 @@ func (s *SignerServer) Sign(ctx context.Context, sr *pb.SignatureRequest) (*pb.S KeyID: &pb.KeyID{ID: tufKey.ID()}, Algorithm: &pb.Algorithm{Algorithm: tufKey.Algorithm().String()}, }, - Algorithm: signatures[0].Method, + Algorithm: &pb.Algorithm{Algorithm: signatures[0].Method.String()}, Content: signatures[0].Signature, }