aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicola Murino <nicola.murino@gmail.com>2025-01-26 10:45:16 +0100
committerGopher Robot <gobot@golang.org>2025-04-03 13:05:29 -0700
commit769bcd6997ac6f3154e27b73b3587295f7720e66 (patch)
tree121a4b7a8a71c90ee0a41c088bf5340bdfad5541
parentd0a798f774735c176ed0d3500ac986957a02660f (diff)
downloadgo-x-crypto-769bcd6997ac6f3154e27b73b3587295f7720e66.tar.xz
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 <filippo@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Carlos Amedee <carlos@golang.org> Reviewed-by: Carlos Amedee <carlos@golang.org>
-rw-r--r--ssh/handshake.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/ssh/handshake.go b/ssh/handshake.go
index c9202b0..b6bf546 100644
--- a/ssh/handshake.go
+++ b/ssh/handshake.go
@@ -5,7 +5,6 @@
package ssh
import (
- "crypto/rand"
"errors"
"fmt"
"io"
@@ -501,7 +500,7 @@ func (t *handshakeTransport) sendKexInit() error {
CompressionClientServer: supportedCompressions,
CompressionServerClient: supportedCompressions,
}
- io.ReadFull(rand.Reader, msg.Cookie[:])
+ io.ReadFull(t.config.Rand, msg.Cookie[:])
// We mutate the KexAlgos slice, in order to add the kex-strict extension algorithm,
// and possibly to add the ext-info extension algorithm. Since the slice may be the