]> Cypherpunks repositories - gostls13.git/commitdiff
crypto/internal/fips/aes/gcm: fix PPC64 gcm debug option logic
authorPaul E. Murphy <murp@ibm.com>
Tue, 19 Nov 2024 17:28:49 +0000 (11:28 -0600)
committerPaul Murphy <murp@ibm.com>
Tue, 19 Nov 2024 18:44:13 +0000 (18:44 +0000)
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 <filippo@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Archana Ravindar <aravinda@redhat.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
src/crypto/internal/fips/aes/gcm/gcm_ppc64x.go

index 3325f7b21791d29446f0929130640121fc891ce4..c0b90d742f4b7620dc9eab61479b2654edd49135 100644 (file)
@@ -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)