Skip to content

Commit

Permalink
Fixes incorrect return values in RequestAuthentication()
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashy5000 committed Jul 27, 2024
1 parent 51431a9 commit 864b118
Show file tree
Hide file tree
Showing 5 changed files with 151 additions and 2 deletions.
4 changes: 2 additions & 2 deletions node_util/authentication.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ func RequestAuthentication(peer_ip string) (PublicKey, bool, error) {
// Read the response
body, err := io.ReadAll(res.Body)
if err != nil {
return PublicKey{}, false
return PublicKey{}, false, err
}
// Unmarshal the response
var proof AuthenticationProof
err = json.Unmarshal(body, &proof)
if err != nil {
return PublicKey{}, false
return PublicKey{}, false, err
}
// Verify the signature
isValid := VerifyAuthenticationProof(&proof, digest[:])
Expand Down
8 changes: 8 additions & 0 deletions peer_server/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions peer_server/.idea/peer_server.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions peer_server/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

124 changes: 124 additions & 0 deletions peer_server/.idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 864b118

Please sign in to comment.