Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(p2p): handshake signature #210

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

benjiewheeler
Copy link

@benjiewheeler benjiewheeler commented Jul 26, 2023

Background

The handshake resulted in invalid signature and the program crashes with the error

p2p message, invalid signature: the inner signature structure must be present, was nil

Summary

This PR changes:

  • the public key used in the HandshakeMessage from hardcoded to randomly generated
  • the signature is now generated from the private key
  • the handshake token to the the sha256 checksum of the handshake's timestamp

Note

Checklist

  • Backward compatible?
  • Test enough in your local environment?
  • Add related test cases?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant