Skip to content
Snippets Groups Projects
Commit c92d7a30 authored by Niamh Nikali's avatar Niamh Nikali
Browse files

Revert "Merge branch 'xx-2486/clientRegBucket' into 'release'"

This reverts merge request !273
parent b062b5df
No related branches found
No related tags found
1 merge request!58Revert "Modify waiting lock"
......@@ -66,7 +66,8 @@ func (s *MockRegistration) Poll(*pb.PermissioningPoll, *connect.Auth, string) (*
}
// Registers a user and returns a signed public key
func (s *MockRegistration) RegisterUser(key string) (hash []byte, err error) {
func (s *MockRegistration) RegisterUser(registrationCode,
key string) (hash []byte, err error) {
return nil, nil
}
......@@ -105,7 +106,8 @@ func (s *MockRegistrationError) Poll(*pb.PermissioningPoll, *connect.Auth, strin
}
// Registers a user and returns a signed public key
func (s *MockRegistrationError) RegisterUser(key string) (hash []byte, err error) {
func (s *MockRegistrationError) RegisterUser(registrationCode,
key string) (hash []byte, err error) {
return nil, nil
}
......
......@@ -9,7 +9,7 @@ require (
github.com/stretchr/testify v1.6.1 // indirect
gitlab.com/elixxir/crypto v0.0.0-20200811195343-de268a55c7c4
gitlab.com/elixxir/primitives v0.0.0-20200812191102-31c01f08b4dc
gitlab.com/xx_network/comms v0.0.0-20200825213037-f58fa7c0a641
gitlab.com/xx_network/comms v0.0.0-20200818182121-732dd75b1947
gitlab.com/xx_network/crypto v0.0.0-20200806235322-ede3c15881ce
gitlab.com/xx_network/primitives v0.0.0-20200812183720-516a65a4a9b2
gitlab.com/xx_network/ring v0.0.2
......
......@@ -73,8 +73,6 @@ gitlab.com/elixxir/primitives v0.0.0-20200812191102-31c01f08b4dc/go.mod h1:pJx2D
gitlab.com/xx_network/comms v0.0.0-20200805174823-841427dd5023/go.mod h1:owEcxTRl7gsoM8c3RQ5KAm5GstxrJp5tn+6JfQ4z5Hw=
gitlab.com/xx_network/comms v0.0.0-20200818182121-732dd75b1947 h1:g0k4nP0o/6qkh09F9d/Fy7Ys93fkyZU+kK71JviLdMg=
gitlab.com/xx_network/comms v0.0.0-20200818182121-732dd75b1947/go.mod h1:idLzPGYig57XE7xuU93OlIF9s6NgSJj7OArQvsd5DjY=
gitlab.com/xx_network/comms v0.0.0-20200825213037-f58fa7c0a641 h1:d48S6FLIUJa1RMm5E20P/kbM8upHmfVgoc9G4+TDjhk=
gitlab.com/xx_network/comms v0.0.0-20200825213037-f58fa7c0a641/go.mod h1:idLzPGYig57XE7xuU93OlIF9s6NgSJj7OArQvsd5DjY=
gitlab.com/xx_network/crypto v0.0.0-20200806202113-978fa1984bbf/go.mod h1:i0df/q6dDCBiscgD51fMoS2U2TBrm6LcyN822JmB5Tw=
gitlab.com/xx_network/crypto v0.0.0-20200806235322-ede3c15881ce h1:gypNBUl2guESEv4MDgH+miwYqR4jPoWM8dLt2Zs5gIs=
gitlab.com/xx_network/crypto v0.0.0-20200806235322-ede3c15881ce/go.mod h1:i0df/q6dDCBiscgD51fMoS2U2TBrm6LcyN822JmB5Tw=
......
This diff is collapsed.
......@@ -349,6 +349,7 @@ message NodeRegistration {
// UserRegistration message to initialize registration process
message UserRegistration {
string RegistrationCode = 1;
string ClientRSAPubKey = 2;
}
......
......@@ -43,7 +43,7 @@ func (r *Comms) RegisterUser(ctx context.Context, msg *pb.UserRegistration) (
*pb.UserRegistrationConfirmation, error) {
// Obtain the signed key by passing to registration server
pubKey := msg.GetClientRSAPubKey()
signature, err := r.handler.RegisterUser(pubKey)
signature, err := r.handler.RegisterUser(msg.GetRegistrationCode(), pubKey)
// Obtain the error message, if any
errMsg := ""
if err != nil {
......
......@@ -62,7 +62,7 @@ func StartRegistrationServer(id *id.ID, localServer string, handler Handler,
}
type Handler interface {
RegisterUser(pubKey string) (signature []byte, err error)
RegisterUser(registrationCode, pubKey string) (signature []byte, err error)
GetCurrentClientVersion() (version string, err error)
RegisterNode(salt []byte, serverAddr, serverTlsCert, gatewayAddr,
gatewayTlsCert, registrationCode string) error
......@@ -73,7 +73,7 @@ type Handler interface {
}
type implementationFunctions struct {
RegisterUser func(pubKey string) (signature []byte,
RegisterUser func(registrationCode, pubKey string) (signature []byte,
err error)
GetCurrentClientVersion func() (version string, err error)
RegisterNode func(salt []byte, serverAddr, serverTlsCert, gatewayAddr,
......@@ -101,7 +101,8 @@ func NewImplementation() *Implementation {
return &Implementation{
Functions: implementationFunctions{
RegisterUser: func(pubKey string) (signature []byte, err error) {
RegisterUser: func(registrationCode,
pubKey string) (signature []byte, err error) {
warn(um)
return nil, nil
},
......@@ -134,8 +135,9 @@ func NewImplementation() *Implementation {
}
// Registers a user and returns a signed public key
func (s *Implementation) RegisterUser(pubKey string) (signature []byte, err error) {
return s.Functions.RegisterUser(pubKey)
func (s *Implementation) RegisterUser(registrationCode,
pubKey string) (signature []byte, err error) {
return s.Functions.RegisterUser(registrationCode, pubKey)
}
func (s *Implementation) GetCurrentClientVersion() (string, error) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment