gcm_get_funcs(): Add missing fallback for ghash on x86_64
authorTomas Mraz <tomas@openssl.org>
Mon, 14 Nov 2022 18:31:17 +0000 (19:31 +0100)
committerTomas Mraz <tomas@openssl.org>
Tue, 15 Nov 2022 21:35:41 +0000 (22:35 +0100)
Fixes #19673

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19674)

crypto/modes/gcm128.c

index 9a9adc9df86b9bcecd748e6b7b65dcacc14cf748..0b31e671f0ab7404bc9829033ebf67abdac3b1c6 100644 (file)
@@ -457,6 +457,11 @@ static void gcm_get_funcs(struct gcm_funcs_st *ctx)
     ctx->gmult = gcm_gmult_4bit_x86;
     ctx->ghash = gcm_ghash_4bit_x86;
     return;
+# else
+    /* x86_64 fallback defaults */
+    ctx->gmult = gcm_gmult_4bit;
+    ctx->ghash = gcm_ghash_4bit;
+    return;
 # endif
 #elif defined(GHASH_ASM_ARM)
     /* ARM defaults */