Skip to content

Commit 2731067

Browse files
qmuntaldagood
andauthored
Update tls1prf.go
Co-authored-by: Davis Goodin <[email protected]>
1 parent 573b670 commit 2731067

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tls1prf.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ func TLS1PRF(result, secret, label, seed []byte, h func() hash.Hash) error {
9494
return newOpenSSLError("EVP_PKEY_derive")
9595
}
9696
// The Go standard library expects TLS1PRF to return the requested number of bytes,
97-
// fail if it doesn't.
97+
// fail if it doesn't. While there is no known situation where this will happen,
98+
// EVP_PKEY_derive handles multiple algorithms and there could be a subtle mismatch
99+
// after more code changes in the future.
98100
if outLen != C.size_t(len(result)) {
99101
return errors.New("tls1-prf: derived less bytes than requested")
100102
}

0 commit comments

Comments
 (0)