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

wireguard: fix parsing keys #804

Merged
merged 1 commit into from
May 24, 2021
Merged

wireguard: fix parsing keys #804

merged 1 commit into from
May 24, 2021

Conversation

K900
Copy link
Contributor

@K900 K900 commented May 24, 2021

Load the keys from the correct place in the message, and load them as the right length as well. Fixes #803.

Load the keys from the correct place in the message, and load them as the right length as well.

def decode(self):
nla.decode(self)
self['value'] = b64encode(self['value'])
self['value'] = b64encode(self['key'])
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to also .decode() this, so that the keys are strings, the same way they're accepted in other places.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, I'll take a look.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please tell me what you decide on, because that's going to determine how I should handle this on my application's side.

@svinota
Copy link
Owner

svinota commented May 24, 2021

Thanks!

@svinota svinota merged commit de0857e into svinota:master May 24, 2021
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.

WireGuard keys are parsed incorrectly
2 participants