Support caller-specified time source via callback#192
Merged
raycoll merged 4 commits intoaws:masterfrom Feb 4, 2016
Merged
Conversation
This change adds a new callback that allows the caller to specify a time-providing function for s2n. This allows us to use faster time sources in some environments, and will also allow for time to be mocked in certain unit tests.
The alpn test case takes up to 30 seconds to run. Fake the time using the new pluggable time function.
Contributor
|
I'm confused why f36f5bc caused the s2n_cbc_verify_test to fail for the .5 sigma case. Does the initial random seed of data give this unit test a chance of failing at any given run? |
Contributor
Author
|
A single-tailed uniform random distribution should fail a .5 sigma test about one in every 200 iterations. We could make it less sensitive, but then the test wouldn't be as valuable. I should really convert those tests to something more discerning. I have some replacements from Martin Albrecht that do a different kind of test but haven't integrated them yet. |
raycoll
added a commit
that referenced
this pull request
Feb 4, 2016
Support caller-specified time source via callback
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.
This change adds a new callback that allows the caller to specify
a time-providing function for s2n. This allows us to use faster
time sources in some environments, and will also allow for time
to be mocked in certain unit tests.