u2f
u2f copied to clipboard
add go.mod, allow overriding rand.Reader and time.Now
add go.mod
A basic go.mod file with go 1.14 requirement (N-3 at the moment). It could be older or newer if you wish.
allow overriding rand.Reader and time.Now and make Registration.Authenticate and NewChallenge backward compatible
We run u2f in a special environment with a custom time provider, so it's a must for us. rand.Reader override makes tests a bit cleaner IMO. First commit adds Config in a clean but incompatible way. Second commit makes the changes backward compatible. I based the changes on https://github.com/tstranex/u2f/pull/13#issuecomment-386826012