From fa52db6a3ff9852dc25368d468d9eda2331e7a7d Mon Sep 17 00:00:00 2001 From: "Paul E. Murphy" Date: Tue, 19 Nov 2024 11:28:49 -0600 Subject: [PATCH] crypto/internal/fips/aes/gcm: fix PPC64 gcm debug option logic AES-GCM is always supported, unless the debug option explicitly turns it off. Change-Id: Iac17fd8429307d48daa601249a2505bcd1b1f892 Reviewed-on: https://go-review.googlesource.com/c/go/+/629695 Reviewed-by: Filippo Valsorda Reviewed-by: Cherry Mui Reviewed-by: Archana Ravindar LUCI-TryBot-Result: Go LUCI Reviewed-by: Dmitri Shuralyov --- src/crypto/internal/fips/aes/gcm/gcm_ppc64x.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crypto/internal/fips/aes/gcm/gcm_ppc64x.go b/src/crypto/internal/fips/aes/gcm/gcm_ppc64x.go index 3325f7b2179..c0b90d742f4 100644 --- a/src/crypto/internal/fips/aes/gcm/gcm_ppc64x.go +++ b/src/crypto/internal/fips/aes/gcm/gcm_ppc64x.go @@ -29,7 +29,7 @@ func counterCryptASM(nr int, out, in []byte, counter *[gcmBlockSize]byte, key *u // at runtime with GODEBUG=cpu.something=off, so introduce a new GODEBUG // knob for that. It's intentionally only checked at init() time, to // avoid the performance overhead of checking it every time. -var supportsAESGCM = godebug.New("#ppc64gcm").Value() == "off" +var supportsAESGCM = godebug.New("#ppc64gcm").Value() != "off" func init() { impl.Register("gcm", "POWER8", &supportsAESGCM)