-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Skip one byte reads and writes to be deterministic
TLS handshake key generation uses internally `randutil.MaybeReadByte` which randomly reads one byte from the Rand reader. This makes the bytes used by handshake process non-deterministic. To avoid this, we override the state Rand buffer to avoid writing or reading from it when only one byte is needed. See https://github.com/golang/go/blob/70491a81113e7003e314451f3e3cf134c4d41dd7/src/crypto/internal/randutil/randutil.go#L25
- Loading branch information
1 parent
d1d1515
commit a5ae86d
Showing
2 changed files
with
49 additions
and
17 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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