Skip to content

Commit 769bcd6

Browse files
drakkangopherbot
authored andcommitted
ssh: use the configured rand in kex init
Change-Id: I4f89c395886b9dd07b584d1fcf1a0f2df215b91b Reviewed-on: https://go-review.googlesource.com/c/crypto/+/644435 Reviewed-by: Filippo Valsorda <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Carlos Amedee <[email protected]> Reviewed-by: Carlos Amedee <[email protected]>
1 parent d0a798f commit 769bcd6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Diff for: ssh/handshake.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
package ssh
66

77
import (
8-
"crypto/rand"
98
"errors"
109
"fmt"
1110
"io"
@@ -501,7 +500,7 @@ func (t *handshakeTransport) sendKexInit() error {
501500
CompressionClientServer: supportedCompressions,
502501
CompressionServerClient: supportedCompressions,
503502
}
504-
io.ReadFull(rand.Reader, msg.Cookie[:])
503+
io.ReadFull(t.config.Rand, msg.Cookie[:])
505504

506505
// We mutate the KexAlgos slice, in order to add the kex-strict extension algorithm,
507506
// and possibly to add the ext-info extension algorithm. Since the slice may be the

0 commit comments

Comments
 (0)