[go] crypto/internal/impl: restore every implementation in Reset

0 views
Skip to first unread message

Gopher Robot (Gerrit)

unread,
Aug 10, 2026, 4:50:48 PM (13 hours ago) Aug 10
to Liz Fong-Jones, goph...@pubsubhelper.golang.org, golang-...@googlegroups.com, Dmitri Shuralyov, Dmitri Shuralyov, Mark Freeman, golang...@luci-project-accounts.iam.gserviceaccount.com, Filippo Valsorda, golang-co...@googlegroups.com

Gopher Robot submitted the change

Change information

Commit message:
crypto/internal/impl: restore every implementation in Reset

Reset returned after restoring the first implementation registered for
the package, leaving any others disabled.

Its only caller is cryptotest.TestAllImplementations, which registers it
as a cleanup and whose loop ends by selecting the base implementation,
disabling all of them. Every test that ran afterwards in the same binary
therefore silently exercised only the first implementation, or the base
one, rather than the platform's.

This is reachable today with sha256 on amd64, which registers both AVX2
and SHA-NI and can have both available at once, with subtle on loong64,
and with gcm on s390x.
Change-Id: I8d8ffe2294f5a800a86f8c6ec5ca12aee7867d4d
Auto-Submit: Filippo Valsorda <fil...@golang.org>
Reviewed-by: Dmitri Shuralyov <dmit...@google.com>
Reviewed-by: Filippo Valsorda <fil...@golang.org>
Reviewed-by: Mark Freeman <markf...@google.com>
Files:
  • M src/crypto/internal/impl/impl.go
  • A src/crypto/internal/impl/impl_test.go
Change size: S
Delta: 2 files changed, 41 insertions(+), 1 deletion(-)
Branch: refs/heads/master
Submit Requirements:
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I8d8ffe2294f5a800a86f8c6ec5ca12aee7867d4d
Gerrit-Change-Number: 811280
Gerrit-PatchSet: 3
Gerrit-Owner: Liz Fong-Jones <li...@honeycomb.io>
Gerrit-Reviewer: Dmitri Shuralyov <dmit...@google.com>
Gerrit-Reviewer: Filippo Valsorda <fil...@golang.org>
Gerrit-Reviewer: Gopher Robot <go...@golang.org>
Gerrit-Reviewer: Mark Freeman <markf...@google.com>
Gerrit-CC: Dmitri Shuralyov <dmit...@golang.org>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages