diff --git a/dnscrypt-proxy/crypto.go b/dnscrypt-proxy/crypto.go index f36b2e2a..4786edb5 100644 --- a/dnscrypt-proxy/crypto.go +++ b/dnscrypt-proxy/crypto.go @@ -5,7 +5,6 @@ crypto_rand "crypto/rand" "crypto/sha512" "errors" - "math/rand" "github.com/jedisct1/dlog" "github.com/jedisct1/xsecretbox" @@ -102,7 +101,7 @@ func (proxy *Proxy) Encrypt( minQuestionSize = Max(proxy.questionSizeEstimator.MinQuestionSize(), minQuestionSize) } else { var xpad [1]byte - rand.Read(xpad[:]) + crypto_rand.Read(xpad[:]) minQuestionSize += int(xpad[0]) } paddedLength := Min(MaxDNSUDPPacketSize, (Max(minQuestionSize, QueryOverhead)+1+63) & ^63) diff --git a/go.mod b/go.mod index eea256d7..51f11929 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/dnscrypt/dnscrypt-proxy -go 1.19 +go 1.20 require ( github.com/BurntSushi/toml v1.2.1