Skip to content
Snippets Groups Projects
Commit 78a72d2b authored by Martin Stiemerling's avatar Martin Stiemerling :speech_balloon:
Browse files

Cleaned up, added addpeer (kinda unsafe by now)

parent 86cdef40
No related branches found
No related tags found
1 merge request!9First working draft version
...@@ -11,6 +11,8 @@ import ( ...@@ -11,6 +11,8 @@ import (
"sync" "sync"
"time" "time"
pbETSI "code.fbi.h-da.de/m.stiemerling/proto-kms/kmsetsiproto"
pbIC "code.fbi.h-da.de/m.stiemerling/proto-kms/kmsintercomproto"
"code.fbi.h-da.de/m.stiemerling/proto-kms/quantumlayer" "code.fbi.h-da.de/m.stiemerling/proto-kms/quantumlayer"
"github.com/google/uuid" "github.com/google/uuid"
) )
...@@ -32,6 +34,8 @@ type eKMS struct { ...@@ -32,6 +34,8 @@ type eKMS struct {
qleMapMutex sync.Mutex qleMapMutex sync.Mutex
QuantumElements map[qlElementId]*QuantumElement QuantumElements map[qlElementId]*QuantumElement
KmsPeers map[string]*kmsPeer KmsPeers map[string]*kmsPeer
pbETSI.UnimplementedKmsETSIServer
pbIC.UnimplementedKmsTalkerServer
} }
// Will keep information about the quantum elements that this eKMS is talking to // Will keep information about the quantum elements that this eKMS is talking to
......
...@@ -15,33 +15,38 @@ var ( ...@@ -15,33 +15,38 @@ var (
etsiPort = flag.Int("port", 50900, "The server port") etsiPort = flag.Int("port", 50900, "The server port")
) )
type etsiServer struct { func (s *eKMS) ETSICapabilities(ctx context.Context, in *pb.ETSICapabilitiesRequest) (capReply *pb.ETSICapabilitiesReply, err error) {
pb.UnimplementedKmsETSIServer
}
func (s *etsiServer) Capabilities(ctx context.Context, in *pb.CapabilitiesRequest) (capReply *pb.CapabilitiesReply, err error) {
log.Printf("Received: %v", in.GetMyKmsName()) log.Printf("Received: %v", in.GetMyKmsName())
return &pb.CapabilitiesReply{ return &pb.ETSICapabilitiesReply{
PeerKmsName: "whatever", PeerKmsName: "whatever",
}, nil }, nil
} }
func (s *etsiServer) AddKMSPeer(ctx context.Context, in *pb.KMSPeerRequest) (*pb.KMSPeerReply, error) { func (s *eKMS) ETSIAddKMSPeer(ctx context.Context, in *pb.ETSIKMSPeerRequest) (*pb.ETSIKMSPeerReply, error) {
return nil, nil
s.AddPeer(in.GetKmsPeerSocket())
return &pb.ETSIKMSPeerReply{
KmsPeerName: s.kmsName,
}, nil
} }
func (s *etsiServer) RemoveKMSPeer(ctx context.Context, in *pb.KMSPeerRequest) (*pb.KMSPeerReply, error) { func (s *eKMS) ETSIRemoveKMSPeer(ctx context.Context, in *pb.ETSIKMSPeerRequest) (*pb.ETSIKMSPeerReply, error) {
return nil, nil s.RemovePeer(in.GetKmsPeerSocket())
return &pb.ETSIKMSPeerReply{
KmsPeerName: s.kmsName,
}, nil
} }
func (s *etsiServer) GetEncryptKeys256Bit(ctx context.Context, in *pb.GetEncryptKeys256BitRequest) (*pb.GetEncryptKeys256BitReply, error) { func (s *eKMS) GetEncryptKeys256Bit(ctx context.Context, in *pb.ETSIGetEncryptKeys256BitRequest) (*pb.ETSIGetEncryptKeys256BitReply, error) {
log.Printf("Received request for n=%d keys", in.GetAmount()) log.Printf("Received request for n=%d keys", in.GetAmount())
testBytes := []byte{120, 120, 120} testBytes := []byte{120, 120, 120}
// Construct any response // Construct any response
return &pb.GetEncryptKeys256BitReply{ return &pb.ETSIGetEncryptKeys256BitReply{
KeyID: "2", KeyID: "2",
Key: testBytes, Key: testBytes,
}, nil }, nil
...@@ -55,7 +60,7 @@ func StartETSI() { ...@@ -55,7 +60,7 @@ func StartETSI() {
log.Fatalf("failed to listen: %v", err) log.Fatalf("failed to listen: %v", err)
} }
s := grpc.NewServer() s := grpc.NewServer()
pb.RegisterKmsETSIServer(s, &etsiServer{}) pb.RegisterKmsETSIServer(s, &eKMS{})
log.Printf("server listening at %v", lis.Addr()) log.Printf("server listening at %v", lis.Addr())
if err := s.Serve(lis); err != nil { if err := s.Serve(lis); err != nil {
log.Fatalf("failed to serve: %v", err) log.Fatalf("failed to serve: %v", err)
......
...@@ -11,14 +11,10 @@ import ( ...@@ -11,14 +11,10 @@ import (
"google.golang.org/grpc" "google.golang.org/grpc"
) )
type intercomServer struct { func (s *eKMS) InterComCapabilities(ctx context.Context, in *pb.InterComCapabilitiesRequest) (capReply *pb.InterComCapabilitiesReply, err error) {
pb.UnimplementedKmsTalkerServer
}
func (s *intercomServer) Capabilities(ctx context.Context, in *pb.CapabilitiesRequest) (capReply *pb.CapabilitiesReply, err error) {
log.Printf("Received: %v", in.GetMyKmsName()) log.Printf("Received: %v", in.GetMyKmsName())
return &pb.CapabilitiesReply{ return &pb.InterComCapabilitiesReply{
PeerKmsName: "whatever", PeerKmsName: "whatever",
}, nil }, nil
} }
...@@ -31,7 +27,7 @@ func StartInterComm(interComPort int) { ...@@ -31,7 +27,7 @@ func StartInterComm(interComPort int) {
log.Fatalf("failed to listen: %v", err) log.Fatalf("failed to listen: %v", err)
} }
s := grpc.NewServer() s := grpc.NewServer()
pb.RegisterKmsTalkerServer(s, &intercomServer{}) pb.RegisterKmsTalkerServer(s, &eKMS{})
log.Printf("server listening at %v", lis.Addr()) log.Printf("server listening at %v", lis.Addr())
if err := s.Serve(lis); err != nil { if err := s.Serve(lis); err != nil {
log.Fatalf("failed to serve: %v", err) log.Fatalf("failed to serve: %v", err)
......
...@@ -47,7 +47,7 @@ func (kms *eKMS) AddPeer(kmsPeerSocket string) { ...@@ -47,7 +47,7 @@ func (kms *eKMS) AddPeer(kmsPeerSocket string) {
// Contact the server and print out its response. // Contact the server and print out its response.
ctx, cancel := context.WithTimeout(context.Background(), time.Second) ctx, cancel := context.WithTimeout(context.Background(), time.Second)
defer cancel() defer cancel()
r, err := c.Capabilities(ctx, &pb.CapabilitiesRequest{MyKmsName: kms.kmsName}) r, err := c.ETSICapabilities(ctx, &pb.ETSICapabilitiesRequest{MyKmsName: kms.kmsName})
if err != nil { if err != nil {
log.Fatalf("could not greet: %v", err) log.Fatalf("could not greet: %v", err)
} }
......
This diff is collapsed.
...@@ -6,32 +6,32 @@ package kmsetsiproto; ...@@ -6,32 +6,32 @@ package kmsetsiproto;
service KmsETSI { service KmsETSI {
// Sends a greeting // Sends a greeting
rpc Capabilities (CapabilitiesRequest) returns (CapabilitiesReply) {} rpc ETSICapabilities (ETSICapabilitiesRequest) returns (ETSICapabilitiesReply) {}
rpc AddKMSPeer(KMSPeerRequest) returns (KMSPeerReply) {} rpc ETSIAddKMSPeer(ETSIKMSPeerRequest) returns (ETSIKMSPeerReply) {}
rpc RemoveKMSPeer(KMSPeerRequest) returns (KMSPeerReply) {} rpc ETSIRemoveKMSPeer(ETSIKMSPeerRequest) returns (ETSIKMSPeerReply) {}
rpc GetEncryptKeys256Bit (GetEncryptKeys256BitRequest) returns (GetEncryptKeys256BitReply) {} rpc ETSIGetEncryptKeys256Bit (ETSIGetEncryptKeys256BitRequest) returns (ETSIGetEncryptKeys256BitReply) {}
} }
// The request message containing the user's name. // The request message containing the user's name.
message CapabilitiesRequest { message ETSICapabilitiesRequest {
string myKmsName = 1; string myKmsName = 1;
} }
// The response message containing the greetings // The response message containing the greetings
message CapabilitiesReply { message ETSICapabilitiesReply {
string peerKmsName= 1; string peerKmsName= 1;
} }
message KMSPeerRequest { message ETSIKMSPeerRequest {
string kmsPeerSocket = 1; string kmsPeerSocket = 1;
} }
message KMSPeerReply { message ETSIKMSPeerReply {
string kmsPeerName = 1; string kmsPeerName = 1;
} }
message GetEncryptKeys256BitRequest { message ETSIGetEncryptKeys256BitRequest {
int64 amount = 1; int64 amount = 1;
} }
...@@ -43,7 +43,7 @@ message GetEncryptKeys256BitRequest { ...@@ -43,7 +43,7 @@ message GetEncryptKeys256BitRequest {
* } * }
*/ */
message GetEncryptKeys256BitReply { message ETSIGetEncryptKeys256BitReply {
string keyID = 1; string keyID = 1;
bytes key = 2; bytes key = 2;
} }
......
...@@ -23,10 +23,10 @@ const _ = grpc.SupportPackageIsVersion7 ...@@ -23,10 +23,10 @@ const _ = grpc.SupportPackageIsVersion7
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type KmsETSIClient interface { type KmsETSIClient interface {
// Sends a greeting // Sends a greeting
Capabilities(ctx context.Context, in *CapabilitiesRequest, opts ...grpc.CallOption) (*CapabilitiesReply, error) ETSICapabilities(ctx context.Context, in *ETSICapabilitiesRequest, opts ...grpc.CallOption) (*ETSICapabilitiesReply, error)
AddKMSPeer(ctx context.Context, in *KMSPeerRequest, opts ...grpc.CallOption) (*KMSPeerReply, error) ETSIAddKMSPeer(ctx context.Context, in *ETSIKMSPeerRequest, opts ...grpc.CallOption) (*ETSIKMSPeerReply, error)
RemoveKMSPeer(ctx context.Context, in *KMSPeerRequest, opts ...grpc.CallOption) (*KMSPeerReply, error) ETSIRemoveKMSPeer(ctx context.Context, in *ETSIKMSPeerRequest, opts ...grpc.CallOption) (*ETSIKMSPeerReply, error)
GetEncryptKeys256Bit(ctx context.Context, in *GetEncryptKeys256BitRequest, opts ...grpc.CallOption) (*GetEncryptKeys256BitReply, error) ETSIGetEncryptKeys256Bit(ctx context.Context, in *ETSIGetEncryptKeys256BitRequest, opts ...grpc.CallOption) (*ETSIGetEncryptKeys256BitReply, error)
} }
type kmsETSIClient struct { type kmsETSIClient struct {
...@@ -37,36 +37,36 @@ func NewKmsETSIClient(cc grpc.ClientConnInterface) KmsETSIClient { ...@@ -37,36 +37,36 @@ func NewKmsETSIClient(cc grpc.ClientConnInterface) KmsETSIClient {
return &kmsETSIClient{cc} return &kmsETSIClient{cc}
} }
func (c *kmsETSIClient) Capabilities(ctx context.Context, in *CapabilitiesRequest, opts ...grpc.CallOption) (*CapabilitiesReply, error) { func (c *kmsETSIClient) ETSICapabilities(ctx context.Context, in *ETSICapabilitiesRequest, opts ...grpc.CallOption) (*ETSICapabilitiesReply, error) {
out := new(CapabilitiesReply) out := new(ETSICapabilitiesReply)
err := c.cc.Invoke(ctx, "/kmsetsiproto.KmsETSI/Capabilities", in, out, opts...) err := c.cc.Invoke(ctx, "/kmsetsiproto.KmsETSI/ETSICapabilities", in, out, opts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
return out, nil return out, nil
} }
func (c *kmsETSIClient) AddKMSPeer(ctx context.Context, in *KMSPeerRequest, opts ...grpc.CallOption) (*KMSPeerReply, error) { func (c *kmsETSIClient) ETSIAddKMSPeer(ctx context.Context, in *ETSIKMSPeerRequest, opts ...grpc.CallOption) (*ETSIKMSPeerReply, error) {
out := new(KMSPeerReply) out := new(ETSIKMSPeerReply)
err := c.cc.Invoke(ctx, "/kmsetsiproto.KmsETSI/AddKMSPeer", in, out, opts...) err := c.cc.Invoke(ctx, "/kmsetsiproto.KmsETSI/ETSIAddKMSPeer", in, out, opts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
return out, nil return out, nil
} }
func (c *kmsETSIClient) RemoveKMSPeer(ctx context.Context, in *KMSPeerRequest, opts ...grpc.CallOption) (*KMSPeerReply, error) { func (c *kmsETSIClient) ETSIRemoveKMSPeer(ctx context.Context, in *ETSIKMSPeerRequest, opts ...grpc.CallOption) (*ETSIKMSPeerReply, error) {
out := new(KMSPeerReply) out := new(ETSIKMSPeerReply)
err := c.cc.Invoke(ctx, "/kmsetsiproto.KmsETSI/RemoveKMSPeer", in, out, opts...) err := c.cc.Invoke(ctx, "/kmsetsiproto.KmsETSI/ETSIRemoveKMSPeer", in, out, opts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
return out, nil return out, nil
} }
func (c *kmsETSIClient) GetEncryptKeys256Bit(ctx context.Context, in *GetEncryptKeys256BitRequest, opts ...grpc.CallOption) (*GetEncryptKeys256BitReply, error) { func (c *kmsETSIClient) ETSIGetEncryptKeys256Bit(ctx context.Context, in *ETSIGetEncryptKeys256BitRequest, opts ...grpc.CallOption) (*ETSIGetEncryptKeys256BitReply, error) {
out := new(GetEncryptKeys256BitReply) out := new(ETSIGetEncryptKeys256BitReply)
err := c.cc.Invoke(ctx, "/kmsetsiproto.KmsETSI/GetEncryptKeys256Bit", in, out, opts...) err := c.cc.Invoke(ctx, "/kmsetsiproto.KmsETSI/ETSIGetEncryptKeys256Bit", in, out, opts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -78,10 +78,10 @@ func (c *kmsETSIClient) GetEncryptKeys256Bit(ctx context.Context, in *GetEncrypt ...@@ -78,10 +78,10 @@ func (c *kmsETSIClient) GetEncryptKeys256Bit(ctx context.Context, in *GetEncrypt
// for forward compatibility // for forward compatibility
type KmsETSIServer interface { type KmsETSIServer interface {
// Sends a greeting // Sends a greeting
Capabilities(context.Context, *CapabilitiesRequest) (*CapabilitiesReply, error) ETSICapabilities(context.Context, *ETSICapabilitiesRequest) (*ETSICapabilitiesReply, error)
AddKMSPeer(context.Context, *KMSPeerRequest) (*KMSPeerReply, error) ETSIAddKMSPeer(context.Context, *ETSIKMSPeerRequest) (*ETSIKMSPeerReply, error)
RemoveKMSPeer(context.Context, *KMSPeerRequest) (*KMSPeerReply, error) ETSIRemoveKMSPeer(context.Context, *ETSIKMSPeerRequest) (*ETSIKMSPeerReply, error)
GetEncryptKeys256Bit(context.Context, *GetEncryptKeys256BitRequest) (*GetEncryptKeys256BitReply, error) ETSIGetEncryptKeys256Bit(context.Context, *ETSIGetEncryptKeys256BitRequest) (*ETSIGetEncryptKeys256BitReply, error)
mustEmbedUnimplementedKmsETSIServer() mustEmbedUnimplementedKmsETSIServer()
} }
...@@ -89,17 +89,17 @@ type KmsETSIServer interface { ...@@ -89,17 +89,17 @@ type KmsETSIServer interface {
type UnimplementedKmsETSIServer struct { type UnimplementedKmsETSIServer struct {
} }
func (UnimplementedKmsETSIServer) Capabilities(context.Context, *CapabilitiesRequest) (*CapabilitiesReply, error) { func (UnimplementedKmsETSIServer) ETSICapabilities(context.Context, *ETSICapabilitiesRequest) (*ETSICapabilitiesReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Capabilities not implemented") return nil, status.Errorf(codes.Unimplemented, "method ETSICapabilities not implemented")
} }
func (UnimplementedKmsETSIServer) AddKMSPeer(context.Context, *KMSPeerRequest) (*KMSPeerReply, error) { func (UnimplementedKmsETSIServer) ETSIAddKMSPeer(context.Context, *ETSIKMSPeerRequest) (*ETSIKMSPeerReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddKMSPeer not implemented") return nil, status.Errorf(codes.Unimplemented, "method ETSIAddKMSPeer not implemented")
} }
func (UnimplementedKmsETSIServer) RemoveKMSPeer(context.Context, *KMSPeerRequest) (*KMSPeerReply, error) { func (UnimplementedKmsETSIServer) ETSIRemoveKMSPeer(context.Context, *ETSIKMSPeerRequest) (*ETSIKMSPeerReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method RemoveKMSPeer not implemented") return nil, status.Errorf(codes.Unimplemented, "method ETSIRemoveKMSPeer not implemented")
} }
func (UnimplementedKmsETSIServer) GetEncryptKeys256Bit(context.Context, *GetEncryptKeys256BitRequest) (*GetEncryptKeys256BitReply, error) { func (UnimplementedKmsETSIServer) ETSIGetEncryptKeys256Bit(context.Context, *ETSIGetEncryptKeys256BitRequest) (*ETSIGetEncryptKeys256BitReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetEncryptKeys256Bit not implemented") return nil, status.Errorf(codes.Unimplemented, "method ETSIGetEncryptKeys256Bit not implemented")
} }
func (UnimplementedKmsETSIServer) mustEmbedUnimplementedKmsETSIServer() {} func (UnimplementedKmsETSIServer) mustEmbedUnimplementedKmsETSIServer() {}
...@@ -114,74 +114,74 @@ func RegisterKmsETSIServer(s grpc.ServiceRegistrar, srv KmsETSIServer) { ...@@ -114,74 +114,74 @@ func RegisterKmsETSIServer(s grpc.ServiceRegistrar, srv KmsETSIServer) {
s.RegisterService(&KmsETSI_ServiceDesc, srv) s.RegisterService(&KmsETSI_ServiceDesc, srv)
} }
func _KmsETSI_Capabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { func _KmsETSI_ETSICapabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CapabilitiesRequest) in := new(ETSICapabilitiesRequest)
if err := dec(in); err != nil { if err := dec(in); err != nil {
return nil, err return nil, err
} }
if interceptor == nil { if interceptor == nil {
return srv.(KmsETSIServer).Capabilities(ctx, in) return srv.(KmsETSIServer).ETSICapabilities(ctx, in)
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/kmsetsiproto.KmsETSI/Capabilities", FullMethod: "/kmsetsiproto.KmsETSI/ETSICapabilities",
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(KmsETSIServer).Capabilities(ctx, req.(*CapabilitiesRequest)) return srv.(KmsETSIServer).ETSICapabilities(ctx, req.(*ETSICapabilitiesRequest))
} }
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _KmsETSI_AddKMSPeer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { func _KmsETSI_ETSIAddKMSPeer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(KMSPeerRequest) in := new(ETSIKMSPeerRequest)
if err := dec(in); err != nil { if err := dec(in); err != nil {
return nil, err return nil, err
} }
if interceptor == nil { if interceptor == nil {
return srv.(KmsETSIServer).AddKMSPeer(ctx, in) return srv.(KmsETSIServer).ETSIAddKMSPeer(ctx, in)
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/kmsetsiproto.KmsETSI/AddKMSPeer", FullMethod: "/kmsetsiproto.KmsETSI/ETSIAddKMSPeer",
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(KmsETSIServer).AddKMSPeer(ctx, req.(*KMSPeerRequest)) return srv.(KmsETSIServer).ETSIAddKMSPeer(ctx, req.(*ETSIKMSPeerRequest))
} }
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _KmsETSI_RemoveKMSPeer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { func _KmsETSI_ETSIRemoveKMSPeer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(KMSPeerRequest) in := new(ETSIKMSPeerRequest)
if err := dec(in); err != nil { if err := dec(in); err != nil {
return nil, err return nil, err
} }
if interceptor == nil { if interceptor == nil {
return srv.(KmsETSIServer).RemoveKMSPeer(ctx, in) return srv.(KmsETSIServer).ETSIRemoveKMSPeer(ctx, in)
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/kmsetsiproto.KmsETSI/RemoveKMSPeer", FullMethod: "/kmsetsiproto.KmsETSI/ETSIRemoveKMSPeer",
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(KmsETSIServer).RemoveKMSPeer(ctx, req.(*KMSPeerRequest)) return srv.(KmsETSIServer).ETSIRemoveKMSPeer(ctx, req.(*ETSIKMSPeerRequest))
} }
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _KmsETSI_GetEncryptKeys256Bit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { func _KmsETSI_ETSIGetEncryptKeys256Bit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetEncryptKeys256BitRequest) in := new(ETSIGetEncryptKeys256BitRequest)
if err := dec(in); err != nil { if err := dec(in); err != nil {
return nil, err return nil, err
} }
if interceptor == nil { if interceptor == nil {
return srv.(KmsETSIServer).GetEncryptKeys256Bit(ctx, in) return srv.(KmsETSIServer).ETSIGetEncryptKeys256Bit(ctx, in)
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/kmsetsiproto.KmsETSI/GetEncryptKeys256Bit", FullMethod: "/kmsetsiproto.KmsETSI/ETSIGetEncryptKeys256Bit",
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(KmsETSIServer).GetEncryptKeys256Bit(ctx, req.(*GetEncryptKeys256BitRequest)) return srv.(KmsETSIServer).ETSIGetEncryptKeys256Bit(ctx, req.(*ETSIGetEncryptKeys256BitRequest))
} }
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
...@@ -194,20 +194,20 @@ var KmsETSI_ServiceDesc = grpc.ServiceDesc{ ...@@ -194,20 +194,20 @@ var KmsETSI_ServiceDesc = grpc.ServiceDesc{
HandlerType: (*KmsETSIServer)(nil), HandlerType: (*KmsETSIServer)(nil),
Methods: []grpc.MethodDesc{ Methods: []grpc.MethodDesc{
{ {
MethodName: "Capabilities", MethodName: "ETSICapabilities",
Handler: _KmsETSI_Capabilities_Handler, Handler: _KmsETSI_ETSICapabilities_Handler,
}, },
{ {
MethodName: "AddKMSPeer", MethodName: "ETSIAddKMSPeer",
Handler: _KmsETSI_AddKMSPeer_Handler, Handler: _KmsETSI_ETSIAddKMSPeer_Handler,
}, },
{ {
MethodName: "RemoveKMSPeer", MethodName: "ETSIRemoveKMSPeer",
Handler: _KmsETSI_RemoveKMSPeer_Handler, Handler: _KmsETSI_ETSIRemoveKMSPeer_Handler,
}, },
{ {
MethodName: "GetEncryptKeys256Bit", MethodName: "ETSIGetEncryptKeys256Bit",
Handler: _KmsETSI_GetEncryptKeys256Bit_Handler, Handler: _KmsETSI_ETSIGetEncryptKeys256Bit_Handler,
}, },
}, },
Streams: []grpc.StreamDesc{}, Streams: []grpc.StreamDesc{},
......
...@@ -22,7 +22,7 @@ const ( ...@@ -22,7 +22,7 @@ const (
// Capabilities // Capabilities
// The request message containing the requesting kms' name. // The request message containing the requesting kms' name.
type CapabilitiesRequest struct { type InterComCapabilitiesRequest struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
...@@ -30,8 +30,8 @@ type CapabilitiesRequest struct { ...@@ -30,8 +30,8 @@ type CapabilitiesRequest struct {
MyKmsName string `protobuf:"bytes,1,opt,name=myKmsName,proto3" json:"myKmsName,omitempty"` MyKmsName string `protobuf:"bytes,1,opt,name=myKmsName,proto3" json:"myKmsName,omitempty"`
} }
func (x *CapabilitiesRequest) Reset() { func (x *InterComCapabilitiesRequest) Reset() {
*x = CapabilitiesRequest{} *x = InterComCapabilitiesRequest{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_kmsintercom_proto_msgTypes[0] mi := &file_kmsintercom_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
...@@ -39,13 +39,13 @@ func (x *CapabilitiesRequest) Reset() { ...@@ -39,13 +39,13 @@ func (x *CapabilitiesRequest) Reset() {
} }
} }
func (x *CapabilitiesRequest) String() string { func (x *InterComCapabilitiesRequest) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
} }
func (*CapabilitiesRequest) ProtoMessage() {} func (*InterComCapabilitiesRequest) ProtoMessage() {}
func (x *CapabilitiesRequest) ProtoReflect() protoreflect.Message { func (x *InterComCapabilitiesRequest) ProtoReflect() protoreflect.Message {
mi := &file_kmsintercom_proto_msgTypes[0] mi := &file_kmsintercom_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
...@@ -57,12 +57,12 @@ func (x *CapabilitiesRequest) ProtoReflect() protoreflect.Message { ...@@ -57,12 +57,12 @@ func (x *CapabilitiesRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x) return mi.MessageOf(x)
} }
// Deprecated: Use CapabilitiesRequest.ProtoReflect.Descriptor instead. // Deprecated: Use InterComCapabilitiesRequest.ProtoReflect.Descriptor instead.
func (*CapabilitiesRequest) Descriptor() ([]byte, []int) { func (*InterComCapabilitiesRequest) Descriptor() ([]byte, []int) {
return file_kmsintercom_proto_rawDescGZIP(), []int{0} return file_kmsintercom_proto_rawDescGZIP(), []int{0}
} }
func (x *CapabilitiesRequest) GetMyKmsName() string { func (x *InterComCapabilitiesRequest) GetMyKmsName() string {
if x != nil { if x != nil {
return x.MyKmsName return x.MyKmsName
} }
...@@ -70,7 +70,7 @@ func (x *CapabilitiesRequest) GetMyKmsName() string { ...@@ -70,7 +70,7 @@ func (x *CapabilitiesRequest) GetMyKmsName() string {
} }
// The response message containing the replying kms' name. // The response message containing the replying kms' name.
type CapabilitiesReply struct { type InterComCapabilitiesReply struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
...@@ -78,8 +78,8 @@ type CapabilitiesReply struct { ...@@ -78,8 +78,8 @@ type CapabilitiesReply struct {
PeerKmsName string `protobuf:"bytes,1,opt,name=peerKmsName,proto3" json:"peerKmsName,omitempty"` PeerKmsName string `protobuf:"bytes,1,opt,name=peerKmsName,proto3" json:"peerKmsName,omitempty"`
} }
func (x *CapabilitiesReply) Reset() { func (x *InterComCapabilitiesReply) Reset() {
*x = CapabilitiesReply{} *x = InterComCapabilitiesReply{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_kmsintercom_proto_msgTypes[1] mi := &file_kmsintercom_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
...@@ -87,13 +87,13 @@ func (x *CapabilitiesReply) Reset() { ...@@ -87,13 +87,13 @@ func (x *CapabilitiesReply) Reset() {
} }
} }
func (x *CapabilitiesReply) String() string { func (x *InterComCapabilitiesReply) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
} }
func (*CapabilitiesReply) ProtoMessage() {} func (*InterComCapabilitiesReply) ProtoMessage() {}
func (x *CapabilitiesReply) ProtoReflect() protoreflect.Message { func (x *InterComCapabilitiesReply) ProtoReflect() protoreflect.Message {
mi := &file_kmsintercom_proto_msgTypes[1] mi := &file_kmsintercom_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
...@@ -105,12 +105,12 @@ func (x *CapabilitiesReply) ProtoReflect() protoreflect.Message { ...@@ -105,12 +105,12 @@ func (x *CapabilitiesReply) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x) return mi.MessageOf(x)
} }
// Deprecated: Use CapabilitiesReply.ProtoReflect.Descriptor instead. // Deprecated: Use InterComCapabilitiesReply.ProtoReflect.Descriptor instead.
func (*CapabilitiesReply) Descriptor() ([]byte, []int) { func (*InterComCapabilitiesReply) Descriptor() ([]byte, []int) {
return file_kmsintercom_proto_rawDescGZIP(), []int{1} return file_kmsintercom_proto_rawDescGZIP(), []int{1}
} }
func (x *CapabilitiesReply) GetPeerKmsName() string { func (x *InterComCapabilitiesReply) GetPeerKmsName() string {
if x != nil { if x != nil {
return x.PeerKmsName return x.PeerKmsName
} }
...@@ -119,7 +119,7 @@ func (x *CapabilitiesReply) GetPeerKmsName() string { ...@@ -119,7 +119,7 @@ func (x *CapabilitiesReply) GetPeerKmsName() string {
// KeyTransportSessionHandling // KeyTransportSessionHandling
// The request message containing the requesting kms' name. // The request message containing the requesting kms' name.
type KeyTransportSessionHandlingRequest struct { type InterComKeyTransportSessionHandlingRequest struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
...@@ -127,8 +127,8 @@ type KeyTransportSessionHandlingRequest struct { ...@@ -127,8 +127,8 @@ type KeyTransportSessionHandlingRequest struct {
MyKmsName string `protobuf:"bytes,1,opt,name=myKmsName,proto3" json:"myKmsName,omitempty"` MyKmsName string `protobuf:"bytes,1,opt,name=myKmsName,proto3" json:"myKmsName,omitempty"`
} }
func (x *KeyTransportSessionHandlingRequest) Reset() { func (x *InterComKeyTransportSessionHandlingRequest) Reset() {
*x = KeyTransportSessionHandlingRequest{} *x = InterComKeyTransportSessionHandlingRequest{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_kmsintercom_proto_msgTypes[2] mi := &file_kmsintercom_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
...@@ -136,13 +136,13 @@ func (x *KeyTransportSessionHandlingRequest) Reset() { ...@@ -136,13 +136,13 @@ func (x *KeyTransportSessionHandlingRequest) Reset() {
} }
} }
func (x *KeyTransportSessionHandlingRequest) String() string { func (x *InterComKeyTransportSessionHandlingRequest) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
} }
func (*KeyTransportSessionHandlingRequest) ProtoMessage() {} func (*InterComKeyTransportSessionHandlingRequest) ProtoMessage() {}
func (x *KeyTransportSessionHandlingRequest) ProtoReflect() protoreflect.Message { func (x *InterComKeyTransportSessionHandlingRequest) ProtoReflect() protoreflect.Message {
mi := &file_kmsintercom_proto_msgTypes[2] mi := &file_kmsintercom_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
...@@ -154,12 +154,12 @@ func (x *KeyTransportSessionHandlingRequest) ProtoReflect() protoreflect.Message ...@@ -154,12 +154,12 @@ func (x *KeyTransportSessionHandlingRequest) ProtoReflect() protoreflect.Message
return mi.MessageOf(x) return mi.MessageOf(x)
} }
// Deprecated: Use KeyTransportSessionHandlingRequest.ProtoReflect.Descriptor instead. // Deprecated: Use InterComKeyTransportSessionHandlingRequest.ProtoReflect.Descriptor instead.
func (*KeyTransportSessionHandlingRequest) Descriptor() ([]byte, []int) { func (*InterComKeyTransportSessionHandlingRequest) Descriptor() ([]byte, []int) {
return file_kmsintercom_proto_rawDescGZIP(), []int{2} return file_kmsintercom_proto_rawDescGZIP(), []int{2}
} }
func (x *KeyTransportSessionHandlingRequest) GetMyKmsName() string { func (x *InterComKeyTransportSessionHandlingRequest) GetMyKmsName() string {
if x != nil { if x != nil {
return x.MyKmsName return x.MyKmsName
} }
...@@ -167,7 +167,7 @@ func (x *KeyTransportSessionHandlingRequest) GetMyKmsName() string { ...@@ -167,7 +167,7 @@ func (x *KeyTransportSessionHandlingRequest) GetMyKmsName() string {
} }
// The response message containing the replying kms' name. // The response message containing the replying kms' name.
type KeyTransportSessionHandlingReply struct { type InterComKeyTransportSessionHandlingReply struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
...@@ -175,8 +175,8 @@ type KeyTransportSessionHandlingReply struct { ...@@ -175,8 +175,8 @@ type KeyTransportSessionHandlingReply struct {
PeerKmsName string `protobuf:"bytes,1,opt,name=peerKmsName,proto3" json:"peerKmsName,omitempty"` PeerKmsName string `protobuf:"bytes,1,opt,name=peerKmsName,proto3" json:"peerKmsName,omitempty"`
} }
func (x *KeyTransportSessionHandlingReply) Reset() { func (x *InterComKeyTransportSessionHandlingReply) Reset() {
*x = KeyTransportSessionHandlingReply{} *x = InterComKeyTransportSessionHandlingReply{}
if protoimpl.UnsafeEnabled { if protoimpl.UnsafeEnabled {
mi := &file_kmsintercom_proto_msgTypes[3] mi := &file_kmsintercom_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
...@@ -184,13 +184,13 @@ func (x *KeyTransportSessionHandlingReply) Reset() { ...@@ -184,13 +184,13 @@ func (x *KeyTransportSessionHandlingReply) Reset() {
} }
} }
func (x *KeyTransportSessionHandlingReply) String() string { func (x *InterComKeyTransportSessionHandlingReply) String() string {
return protoimpl.X.MessageStringOf(x) return protoimpl.X.MessageStringOf(x)
} }
func (*KeyTransportSessionHandlingReply) ProtoMessage() {} func (*InterComKeyTransportSessionHandlingReply) ProtoMessage() {}
func (x *KeyTransportSessionHandlingReply) ProtoReflect() protoreflect.Message { func (x *InterComKeyTransportSessionHandlingReply) ProtoReflect() protoreflect.Message {
mi := &file_kmsintercom_proto_msgTypes[3] mi := &file_kmsintercom_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil { if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
...@@ -202,12 +202,12 @@ func (x *KeyTransportSessionHandlingReply) ProtoReflect() protoreflect.Message { ...@@ -202,12 +202,12 @@ func (x *KeyTransportSessionHandlingReply) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x) return mi.MessageOf(x)
} }
// Deprecated: Use KeyTransportSessionHandlingReply.ProtoReflect.Descriptor instead. // Deprecated: Use InterComKeyTransportSessionHandlingReply.ProtoReflect.Descriptor instead.
func (*KeyTransportSessionHandlingReply) Descriptor() ([]byte, []int) { func (*InterComKeyTransportSessionHandlingReply) Descriptor() ([]byte, []int) {
return file_kmsintercom_proto_rawDescGZIP(), []int{3} return file_kmsintercom_proto_rawDescGZIP(), []int{3}
} }
func (x *KeyTransportSessionHandlingReply) GetPeerKmsName() string { func (x *InterComKeyTransportSessionHandlingReply) GetPeerKmsName() string {
if x != nil { if x != nil {
return x.PeerKmsName return x.PeerKmsName
} }
...@@ -219,36 +219,41 @@ var File_kmsintercom_proto protoreflect.FileDescriptor ...@@ -219,36 +219,41 @@ var File_kmsintercom_proto protoreflect.FileDescriptor
var file_kmsintercom_proto_rawDesc = []byte{ var file_kmsintercom_proto_rawDesc = []byte{
0x0a, 0x11, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x72, 0x0a, 0x11, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x12, 0x10, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x33, 0x0a, 0x13, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3b, 0x0a, 0x1b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f,
0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71,
0x6d, 0x79, 0x4b, 0x6d, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x79, 0x4b, 0x6d, 0x73, 0x4e, 0x61, 0x6d,
0x09, 0x6d, 0x79, 0x4b, 0x6d, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x35, 0x0a, 0x11, 0x43, 0x61, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x79, 0x4b, 0x6d, 0x73, 0x4e, 0x61,
0x6d, 0x65, 0x22, 0x3d, 0x0a, 0x19, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x43, 0x61,
0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12,
0x20, 0x0a, 0x0b, 0x70, 0x65, 0x65, 0x72, 0x4b, 0x6d, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x0a, 0x0b, 0x70, 0x65, 0x65, 0x72, 0x4b, 0x6d, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x65, 0x65, 0x72, 0x4b, 0x6d, 0x73, 0x4e, 0x61, 0x6d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x65, 0x65, 0x72, 0x4b, 0x6d, 0x73, 0x4e, 0x61, 0x6d,
0x65, 0x22, 0x42, 0x0a, 0x22, 0x4b, 0x65, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x65, 0x22, 0x4a, 0x0a, 0x2a, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x4b, 0x65, 0x79,
0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x69, 0x6e, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x79, 0x4b, 0x6d, 0x73, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x79, 0x4b, 0x6d, 0x1c, 0x0a, 0x09, 0x6d, 0x79, 0x4b, 0x6d, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
0x73, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x44, 0x0a, 0x20, 0x4b, 0x65, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x79, 0x4b, 0x6d, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x4c, 0x0a,
0x28, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x4b, 0x65, 0x79, 0x54, 0x72, 0x61, 0x6e,
0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x6e, 0x64,
0x6c, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x65, 0x65, 0x6c, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x65, 0x65,
0x72, 0x4b, 0x6d, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x4b, 0x6d, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
0x70, 0x65, 0x65, 0x72, 0x4b, 0x6d, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x32, 0xf5, 0x01, 0x0a, 0x09, 0x70, 0x65, 0x65, 0x72, 0x4b, 0x6d, 0x73, 0x4e, 0x61, 0x6d, 0x65, 0x32, 0xa5, 0x02, 0x0a, 0x09,
0x4b, 0x6d, 0x73, 0x54, 0x61, 0x6c, 0x6b, 0x65, 0x72, 0x12, 0x5c, 0x0a, 0x0c, 0x43, 0x61, 0x70, 0x4b, 0x6d, 0x73, 0x54, 0x61, 0x6c, 0x6b, 0x65, 0x72, 0x12, 0x74, 0x0a, 0x14, 0x49, 0x6e, 0x74,
0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x25, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65,
0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x61, 0x70, 0x73, 0x12, 0x2d, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x43, 0x61, 0x70,
0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x23, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x1a, 0x2b, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x43, 0x61, 0x70, 0x61,
0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x89, 0x01, 0x0a, 0x1b, 0x4b, 0x65, 0x79, 0x54, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12,
0xa1, 0x01, 0x0a, 0x23, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6d, 0x4b, 0x65, 0x79, 0x54,
0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48,
0x61, 0x6e, 0x64, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x34, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x61, 0x6e, 0x64, 0x6c, 0x69, 0x6e, 0x67, 0x12, 0x3c, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74,
0x65, 0x72, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4b, 0x65, 0x79, 0x54, 0x72, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72,
0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x43, 0x6f, 0x6d, 0x4b, 0x65, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53,
0x6e, 0x64, 0x6c, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x69, 0x6e, 0x67, 0x52, 0x65,
0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x6b, 0x6d, 0x73, 0x69, 0x6e, 0x74, 0x65, 0x72,
0x2e, 0x4b, 0x65, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x65, 0x73, 0x63, 0x6f, 0x6d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x43, 0x6f,
0x6d, 0x4b, 0x65, 0x79, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x65, 0x73,
0x73, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x70, 0x6c, 0x73, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x70, 0x6c,
0x79, 0x22, 0x00, 0x42, 0x3b, 0x5a, 0x39, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x66, 0x62, 0x69, 0x2e, 0x79, 0x22, 0x00, 0x42, 0x3b, 0x5a, 0x39, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x66, 0x62, 0x69, 0x2e,
0x68, 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x6d, 0x2e, 0x73, 0x74, 0x69, 0x65, 0x6d, 0x65, 0x68, 0x2d, 0x64, 0x61, 0x2e, 0x64, 0x65, 0x2f, 0x6d, 0x2e, 0x73, 0x74, 0x69, 0x65, 0x6d, 0x65,
...@@ -271,16 +276,16 @@ func file_kmsintercom_proto_rawDescGZIP() []byte { ...@@ -271,16 +276,16 @@ func file_kmsintercom_proto_rawDescGZIP() []byte {
var file_kmsintercom_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_kmsintercom_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_kmsintercom_proto_goTypes = []interface{}{ var file_kmsintercom_proto_goTypes = []interface{}{
(*CapabilitiesRequest)(nil), // 0: kmsintercomproto.CapabilitiesRequest (*InterComCapabilitiesRequest)(nil), // 0: kmsintercomproto.InterComCapabilitiesRequest
(*CapabilitiesReply)(nil), // 1: kmsintercomproto.CapabilitiesReply (*InterComCapabilitiesReply)(nil), // 1: kmsintercomproto.InterComCapabilitiesReply
(*KeyTransportSessionHandlingRequest)(nil), // 2: kmsintercomproto.KeyTransportSessionHandlingRequest (*InterComKeyTransportSessionHandlingRequest)(nil), // 2: kmsintercomproto.InterComKeyTransportSessionHandlingRequest
(*KeyTransportSessionHandlingReply)(nil), // 3: kmsintercomproto.KeyTransportSessionHandlingReply (*InterComKeyTransportSessionHandlingReply)(nil), // 3: kmsintercomproto.InterComKeyTransportSessionHandlingReply
} }
var file_kmsintercom_proto_depIdxs = []int32{ var file_kmsintercom_proto_depIdxs = []int32{
0, // 0: kmsintercomproto.KmsTalker.Capabilities:input_type -> kmsintercomproto.CapabilitiesRequest 0, // 0: kmsintercomproto.KmsTalker.InterComCapabilities:input_type -> kmsintercomproto.InterComCapabilitiesRequest
2, // 1: kmsintercomproto.KmsTalker.KeyTransportSessionHandling:input_type -> kmsintercomproto.KeyTransportSessionHandlingRequest 2, // 1: kmsintercomproto.KmsTalker.InterComKeyTransportSessionHandling:input_type -> kmsintercomproto.InterComKeyTransportSessionHandlingRequest
1, // 2: kmsintercomproto.KmsTalker.Capabilities:output_type -> kmsintercomproto.CapabilitiesReply 1, // 2: kmsintercomproto.KmsTalker.InterComCapabilities:output_type -> kmsintercomproto.InterComCapabilitiesReply
3, // 3: kmsintercomproto.KmsTalker.KeyTransportSessionHandling:output_type -> kmsintercomproto.KeyTransportSessionHandlingReply 3, // 3: kmsintercomproto.KmsTalker.InterComKeyTransportSessionHandling:output_type -> kmsintercomproto.InterComKeyTransportSessionHandlingReply
2, // [2:4] is the sub-list for method output_type 2, // [2:4] is the sub-list for method output_type
0, // [0:2] is the sub-list for method input_type 0, // [0:2] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension type_name
...@@ -295,7 +300,7 @@ func file_kmsintercom_proto_init() { ...@@ -295,7 +300,7 @@ func file_kmsintercom_proto_init() {
} }
if !protoimpl.UnsafeEnabled { if !protoimpl.UnsafeEnabled {
file_kmsintercom_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { file_kmsintercom_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CapabilitiesRequest); i { switch v := v.(*InterComCapabilitiesRequest); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
...@@ -307,7 +312,7 @@ func file_kmsintercom_proto_init() { ...@@ -307,7 +312,7 @@ func file_kmsintercom_proto_init() {
} }
} }
file_kmsintercom_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { file_kmsintercom_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CapabilitiesReply); i { switch v := v.(*InterComCapabilitiesReply); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
...@@ -319,7 +324,7 @@ func file_kmsintercom_proto_init() { ...@@ -319,7 +324,7 @@ func file_kmsintercom_proto_init() {
} }
} }
file_kmsintercom_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { file_kmsintercom_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*KeyTransportSessionHandlingRequest); i { switch v := v.(*InterComKeyTransportSessionHandlingRequest); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
...@@ -331,7 +336,7 @@ func file_kmsintercom_proto_init() { ...@@ -331,7 +336,7 @@ func file_kmsintercom_proto_init() {
} }
} }
file_kmsintercom_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { file_kmsintercom_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*KeyTransportSessionHandlingReply); i { switch v := v.(*InterComKeyTransportSessionHandlingReply); i {
case 0: case 0:
return &v.state return &v.state
case 1: case 1:
......
...@@ -5,30 +5,29 @@ option go_package = "code.fbi.h-da.de/m.stiemerling/proto-kms/kmsintercomproto"; ...@@ -5,30 +5,29 @@ option go_package = "code.fbi.h-da.de/m.stiemerling/proto-kms/kmsintercomproto";
package kmsintercomproto; package kmsintercomproto;
service KmsTalker { service KmsTalker {
// Sends a greeting rpc InterComCapabilities (InterComCapabilitiesRequest) returns (InterComCapabilitiesReply) {}
rpc Capabilities (CapabilitiesRequest) returns (CapabilitiesReply) {} rpc InterComKeyTransportSessionHandling(InterComKeyTransportSessionHandlingRequest) returns (InterComKeyTransportSessionHandlingReply) {}
rpc KeyTransportSessionHandling(KeyTransportSessionHandlingRequest) returns (KeyTransportSessionHandlingReply) {} }
}
// Capabilities // Capabilities
// The request message containing the requesting kms' name. // The request message containing the requesting kms' name.
message CapabilitiesRequest { message InterComCapabilitiesRequest {
string myKmsName = 1; string myKmsName = 1;
} }
// The response message containing the replying kms' name. // The response message containing the replying kms' name.
message CapabilitiesReply { message InterComCapabilitiesReply {
string peerKmsName= 1; string peerKmsName= 1;
} }
// KeyTransportSessionHandling // KeyTransportSessionHandling
// The request message containing the requesting kms' name. // The request message containing the requesting kms' name.
message KeyTransportSessionHandlingRequest { message InterComKeyTransportSessionHandlingRequest {
string myKmsName = 1; string myKmsName = 1;
} }
// The response message containing the replying kms' name. // The response message containing the replying kms' name.
message KeyTransportSessionHandlingReply { message InterComKeyTransportSessionHandlingReply {
string peerKmsName= 1; string peerKmsName= 1;
} }
...@@ -22,9 +22,8 @@ const _ = grpc.SupportPackageIsVersion7 ...@@ -22,9 +22,8 @@ const _ = grpc.SupportPackageIsVersion7
// //
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type KmsTalkerClient interface { type KmsTalkerClient interface {
// Sends a greeting InterComCapabilities(ctx context.Context, in *InterComCapabilitiesRequest, opts ...grpc.CallOption) (*InterComCapabilitiesReply, error)
Capabilities(ctx context.Context, in *CapabilitiesRequest, opts ...grpc.CallOption) (*CapabilitiesReply, error) InterComKeyTransportSessionHandling(ctx context.Context, in *InterComKeyTransportSessionHandlingRequest, opts ...grpc.CallOption) (*InterComKeyTransportSessionHandlingReply, error)
KeyTransportSessionHandling(ctx context.Context, in *KeyTransportSessionHandlingRequest, opts ...grpc.CallOption) (*KeyTransportSessionHandlingReply, error)
} }
type kmsTalkerClient struct { type kmsTalkerClient struct {
...@@ -35,18 +34,18 @@ func NewKmsTalkerClient(cc grpc.ClientConnInterface) KmsTalkerClient { ...@@ -35,18 +34,18 @@ func NewKmsTalkerClient(cc grpc.ClientConnInterface) KmsTalkerClient {
return &kmsTalkerClient{cc} return &kmsTalkerClient{cc}
} }
func (c *kmsTalkerClient) Capabilities(ctx context.Context, in *CapabilitiesRequest, opts ...grpc.CallOption) (*CapabilitiesReply, error) { func (c *kmsTalkerClient) InterComCapabilities(ctx context.Context, in *InterComCapabilitiesRequest, opts ...grpc.CallOption) (*InterComCapabilitiesReply, error) {
out := new(CapabilitiesReply) out := new(InterComCapabilitiesReply)
err := c.cc.Invoke(ctx, "/kmsintercomproto.KmsTalker/Capabilities", in, out, opts...) err := c.cc.Invoke(ctx, "/kmsintercomproto.KmsTalker/InterComCapabilities", in, out, opts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
return out, nil return out, nil
} }
func (c *kmsTalkerClient) KeyTransportSessionHandling(ctx context.Context, in *KeyTransportSessionHandlingRequest, opts ...grpc.CallOption) (*KeyTransportSessionHandlingReply, error) { func (c *kmsTalkerClient) InterComKeyTransportSessionHandling(ctx context.Context, in *InterComKeyTransportSessionHandlingRequest, opts ...grpc.CallOption) (*InterComKeyTransportSessionHandlingReply, error) {
out := new(KeyTransportSessionHandlingReply) out := new(InterComKeyTransportSessionHandlingReply)
err := c.cc.Invoke(ctx, "/kmsintercomproto.KmsTalker/KeyTransportSessionHandling", in, out, opts...) err := c.cc.Invoke(ctx, "/kmsintercomproto.KmsTalker/InterComKeyTransportSessionHandling", in, out, opts...)
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -57,9 +56,8 @@ func (c *kmsTalkerClient) KeyTransportSessionHandling(ctx context.Context, in *K ...@@ -57,9 +56,8 @@ func (c *kmsTalkerClient) KeyTransportSessionHandling(ctx context.Context, in *K
// All implementations must embed UnimplementedKmsTalkerServer // All implementations must embed UnimplementedKmsTalkerServer
// for forward compatibility // for forward compatibility
type KmsTalkerServer interface { type KmsTalkerServer interface {
// Sends a greeting InterComCapabilities(context.Context, *InterComCapabilitiesRequest) (*InterComCapabilitiesReply, error)
Capabilities(context.Context, *CapabilitiesRequest) (*CapabilitiesReply, error) InterComKeyTransportSessionHandling(context.Context, *InterComKeyTransportSessionHandlingRequest) (*InterComKeyTransportSessionHandlingReply, error)
KeyTransportSessionHandling(context.Context, *KeyTransportSessionHandlingRequest) (*KeyTransportSessionHandlingReply, error)
mustEmbedUnimplementedKmsTalkerServer() mustEmbedUnimplementedKmsTalkerServer()
} }
...@@ -67,11 +65,11 @@ type KmsTalkerServer interface { ...@@ -67,11 +65,11 @@ type KmsTalkerServer interface {
type UnimplementedKmsTalkerServer struct { type UnimplementedKmsTalkerServer struct {
} }
func (UnimplementedKmsTalkerServer) Capabilities(context.Context, *CapabilitiesRequest) (*CapabilitiesReply, error) { func (UnimplementedKmsTalkerServer) InterComCapabilities(context.Context, *InterComCapabilitiesRequest) (*InterComCapabilitiesReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method Capabilities not implemented") return nil, status.Errorf(codes.Unimplemented, "method InterComCapabilities not implemented")
} }
func (UnimplementedKmsTalkerServer) KeyTransportSessionHandling(context.Context, *KeyTransportSessionHandlingRequest) (*KeyTransportSessionHandlingReply, error) { func (UnimplementedKmsTalkerServer) InterComKeyTransportSessionHandling(context.Context, *InterComKeyTransportSessionHandlingRequest) (*InterComKeyTransportSessionHandlingReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method KeyTransportSessionHandling not implemented") return nil, status.Errorf(codes.Unimplemented, "method InterComKeyTransportSessionHandling not implemented")
} }
func (UnimplementedKmsTalkerServer) mustEmbedUnimplementedKmsTalkerServer() {} func (UnimplementedKmsTalkerServer) mustEmbedUnimplementedKmsTalkerServer() {}
...@@ -86,38 +84,38 @@ func RegisterKmsTalkerServer(s grpc.ServiceRegistrar, srv KmsTalkerServer) { ...@@ -86,38 +84,38 @@ func RegisterKmsTalkerServer(s grpc.ServiceRegistrar, srv KmsTalkerServer) {
s.RegisterService(&KmsTalker_ServiceDesc, srv) s.RegisterService(&KmsTalker_ServiceDesc, srv)
} }
func _KmsTalker_Capabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { func _KmsTalker_InterComCapabilities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CapabilitiesRequest) in := new(InterComCapabilitiesRequest)
if err := dec(in); err != nil { if err := dec(in); err != nil {
return nil, err return nil, err
} }
if interceptor == nil { if interceptor == nil {
return srv.(KmsTalkerServer).Capabilities(ctx, in) return srv.(KmsTalkerServer).InterComCapabilities(ctx, in)
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/kmsintercomproto.KmsTalker/Capabilities", FullMethod: "/kmsintercomproto.KmsTalker/InterComCapabilities",
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(KmsTalkerServer).Capabilities(ctx, req.(*CapabilitiesRequest)) return srv.(KmsTalkerServer).InterComCapabilities(ctx, req.(*InterComCapabilitiesRequest))
} }
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _KmsTalker_KeyTransportSessionHandling_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { func _KmsTalker_InterComKeyTransportSessionHandling_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(KeyTransportSessionHandlingRequest) in := new(InterComKeyTransportSessionHandlingRequest)
if err := dec(in); err != nil { if err := dec(in); err != nil {
return nil, err return nil, err
} }
if interceptor == nil { if interceptor == nil {
return srv.(KmsTalkerServer).KeyTransportSessionHandling(ctx, in) return srv.(KmsTalkerServer).InterComKeyTransportSessionHandling(ctx, in)
} }
info := &grpc.UnaryServerInfo{ info := &grpc.UnaryServerInfo{
Server: srv, Server: srv,
FullMethod: "/kmsintercomproto.KmsTalker/KeyTransportSessionHandling", FullMethod: "/kmsintercomproto.KmsTalker/InterComKeyTransportSessionHandling",
} }
handler := func(ctx context.Context, req interface{}) (interface{}, error) { handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(KmsTalkerServer).KeyTransportSessionHandling(ctx, req.(*KeyTransportSessionHandlingRequest)) return srv.(KmsTalkerServer).InterComKeyTransportSessionHandling(ctx, req.(*InterComKeyTransportSessionHandlingRequest))
} }
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
...@@ -130,12 +128,12 @@ var KmsTalker_ServiceDesc = grpc.ServiceDesc{ ...@@ -130,12 +128,12 @@ var KmsTalker_ServiceDesc = grpc.ServiceDesc{
HandlerType: (*KmsTalkerServer)(nil), HandlerType: (*KmsTalkerServer)(nil),
Methods: []grpc.MethodDesc{ Methods: []grpc.MethodDesc{
{ {
MethodName: "Capabilities", MethodName: "InterComCapabilities",
Handler: _KmsTalker_Capabilities_Handler, Handler: _KmsTalker_InterComCapabilities_Handler,
}, },
{ {
MethodName: "KeyTransportSessionHandling", MethodName: "InterComKeyTransportSessionHandling",
Handler: _KmsTalker_KeyTransportSessionHandling_Handler, Handler: _KmsTalker_InterComKeyTransportSessionHandling_Handler,
}, },
}, },
Streams: []grpc.StreamDesc{}, Streams: []grpc.StreamDesc{},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment