mirror of
https://github.com/golang/go.git
synced 2025-05-16 12:54:37 +00:00
Fixes #68762 Change-Id: Id89c770571d7cc27c6cf7932139ec3424383a7ef Reviewed-on: https://go-review.googlesource.com/c/go/+/629938 Reviewed-by: Roland Shoemaker <roland@golang.org> Auto-Submit: 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>
487 B
487 B
[GenerateKey] now returns an error if a key of less than 1024 bits is requested.
All Sign, Verify, Encrypt, and Decrypt methods now return an error if used with
a key smaller than 1024 bits. Such keys are insecure and should not be used.
Setting GODEBUG=rsa1024min=0
or including //go:debug rsa1024min=0
in a
source file restores the old behavior, but we recommend doing so only in tests,
if necessary. A new [GenerateKey] example provides an easy-to-use standard
2048-bit test key.