Skip to content
Snippets Groups Projects
Commit 45fb49c5 authored by Josh Brooks's avatar Josh Brooks
Browse files

Remove pub key field from UsernameValidationRequest

parent 186f9ab7
No related branches found
No related tags found
2 merge requests!58Draft: Projects/crust RELEASE,!55Add validateUsername endpoint to UD
......@@ -54,7 +54,7 @@ require (
github.com/tyler-smith/go-bip39 v1.1.0 // indirect
github.com/zeebo/blake3 v0.1.1 // indirect
gitlab.com/elixxir/bloomfilter v0.0.0-20211222005329-7d931ceead6f // indirect
gitlab.com/elixxir/comms v0.0.4-0.20220819220424-f2328c8b26b1 // indirect
gitlab.com/elixxir/comms v0.0.4-0.20220826165747-4821117053d5 // indirect
gitlab.com/elixxir/ekv v0.1.7 // indirect
gitlab.com/xx_network/ring v0.0.3-0.20220222211904-da613960ad93 // indirect
go.uber.org/ratelimit v0.2.0 // indirect
......
......@@ -568,6 +568,8 @@ gitlab.com/elixxir/comms v0.0.4-0.20220819183938-d6cd8aca6de4 h1:CgI8Xb9lXxeJaMs
gitlab.com/elixxir/comms v0.0.4-0.20220819183938-d6cd8aca6de4/go.mod h1:tlHSrtSliKWUxsck8z/Ql/VJkMdSONV2BeWaUAAXzgk=
gitlab.com/elixxir/comms v0.0.4-0.20220819220424-f2328c8b26b1 h1:KZ8wKOenvQaYNKo+4jdVhy3YJ7Xa3obiPxGziGJWUb4=
gitlab.com/elixxir/comms v0.0.4-0.20220819220424-f2328c8b26b1/go.mod h1:j6so9oYAj2YRjOOu11gFBldtxy4ez/oPkYfqM2J1q1k=
gitlab.com/elixxir/comms v0.0.4-0.20220826165747-4821117053d5 h1:iFNhvChvfRN9g29HvdngQ9R613H++WS7B/XgfJJRVzs=
gitlab.com/elixxir/comms v0.0.4-0.20220826165747-4821117053d5/go.mod h1:j6so9oYAj2YRjOOu11gFBldtxy4ez/oPkYfqM2J1q1k=
gitlab.com/elixxir/crypto v0.0.0-20200804182833-984246dea2c4/go.mod h1:ucm9SFKJo+K0N2GwRRpaNr+tKXMIOVWzmyUD0SbOu2c=
gitlab.com/elixxir/crypto v0.0.3/go.mod h1:ZNgBOblhYToR4m8tj4cMvJ9UsJAUKq+p0gCp07WQmhA=
gitlab.com/elixxir/crypto v0.0.7-0.20220317172048-3de167bd9406/go.mod h1:tD6XjtQh87T2nKZL5I/pYPck5M2wLpkZ1Oz7H/LqO10=
......
......@@ -26,7 +26,7 @@ const (
func validateUsername(request *pb.UsernameValidationRequest,
store *storage.Storage, privKey *rsa.PrivateKey, rng io.Reader) (*pb.UsernameValidation, error) {
// Return an error if the request is invalid
if request == nil || request.Username == "" || request.ReceptionPublicKeyPem == nil {
if request == nil || request.Username == "" {
return &pb.UsernameValidation{}, errors.New("Unable to parse required " +
"fields in registration message")
}
......@@ -55,7 +55,7 @@ func validateUsername(request *pb.UsernameValidationRequest,
// Create a signature verifying the user owns their username
verificationSignature, err := crust.SignVerification(rng, privKey,
request.Username, request.ReceptionPublicKeyPem)
request.Username, []byte(user.RsaPub))
if err != nil {
return nil, errors.Errorf("Failed to create verification signature: %v", err)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment