lib/rand: Various minor fixes (#6752)

crypto/rand output is cryptographically secure by the Go library
documentation's promise. That, rather than strength (= passes randomness
tests) is the property that Syncthing needs).
This commit is contained in:
greatroar
2020-06-17 10:43:58 +02:00
committed by GitHub
parent cbe0d2fffc
commit 273cc9cef8
4 changed files with 16 additions and 16 deletions
+1 -1
View File
@@ -102,7 +102,7 @@ func NewCertificate(certFile, keyFile, commonName string, lifetimeDays int) (tls
// NOTE: update checkExpiry() appropriately if you add or change attributes
// in here, especially DNSNames or IPAddresses.
template := x509.Certificate{
SerialNumber: new(big.Int).SetInt64(rand.Int63()),
SerialNumber: new(big.Int).SetUint64(rand.Uint64()),
Subject: pkix.Name{
CommonName: commonName,
},