Skip to content

Commit

Permalink
Update tls1prf.go
Browse files Browse the repository at this point in the history
Co-authored-by: Davis Goodin <[email protected]>
  • Loading branch information
qmuntal and dagood authored Sep 14, 2023
1 parent 573b670 commit 2731067
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tls1prf.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ func TLS1PRF(result, secret, label, seed []byte, h func() hash.Hash) error {
return newOpenSSLError("EVP_PKEY_derive")
}
// The Go standard library expects TLS1PRF to return the requested number of bytes,
// fail if it doesn't.
// fail if it doesn't. While there is no known situation where this will happen,
// EVP_PKEY_derive handles multiple algorithms and there could be a subtle mismatch
// after more code changes in the future.
if outLen != C.size_t(len(result)) {
return errors.New("tls1-prf: derived less bytes than requested")
}
Expand Down

0 comments on commit 2731067

Please sign in to comment.