crypto/internal/fips140/aes: handle fallback correctly, take 2

Don't fallthrough to the hardware version if we used the generic version.

Missed one case of this in CL 631315.

(Originally broken on CL 624738.)

Change-Id: I5bf485ac8b0007769e4e935794defe2a3592376e
Reviewed-on: https://go-review.googlesource.com/c/go/+/631136
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
This commit is contained in:
Keith Randall 2024-11-22 13:37:26 -08:00
parent 8fb6a46947
commit 8397de2241
1 changed files with 1 additions and 0 deletions

View File

@ -30,6 +30,7 @@ func ctrBlocks8(b *Block, dst, src *[8 * BlockSize]byte, ivlo, ivhi uint64) {
func ctrBlocksS390x(b *Block, dst, src []byte, ivlo, ivhi uint64) {
if b.fallback != nil {
ctrBlocks(b, dst, src, ivlo, ivhi)
return
}
buf := make([]byte, len(src), 8*BlockSize)