Fix time::Instant underflow in handshake #17
Open
pinkisemils wants to merge 1 commit intoWireGuard:masterfrom
Open
Fix time::Instant underflow in handshake #17pinkisemils wants to merge 1 commit intoWireGuard:masterfrom
pinkisemils wants to merge 1 commit intoWireGuard:masterfrom
Conversation
5a906fa to
fb943cb
Compare
Signed-off-by: Emīls <emils@mullvad.net>
fb943cb to
f171579
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On macOS,
time::Instant::now() - time::Duration::from_secs(86400)would panic due to an underflow if the machine was running for less than 24 hours. This of course is not ideal, as that expression is used to initialize the cookie validator. I've worked around this by making the birth of the secret optional, and just assume that a secret without a birthday is invalid. This could also be changed to have the secret itself be optional.