diff options
author | Juergen Christ <jchrist@linux.ibm.com> | 2022-07-25 10:34:26 +0200 |
---|---|---|
committer | Hugo Landau <hlandau@openssl.org> | 2022-07-26 12:27:59 +0100 |
commit | 48e35b99bd0071207cfe39da22eb2502db5c09dc (patch) | |
tree | 5a5412f74992d2c4a52306d0e5d48095ef22bdbf | |
parent | 316fad64c1e541a530910a13160d48b7545ac1e0 (diff) | |
download | openssl-new-48e35b99bd0071207cfe39da22eb2502db5c09dc.tar.gz |
s390x: Fix GCM setup
Rework of GCM code did not include s390x causing NULL pointer dereferences on
GCM operations other than AES-GCM on platforms that support kma. Fix this by
a proper setup of the function pointers.
Fixes: 92c9086e5c2b ("Use separate function to get GCM functions")
Signed-off-by: Juergen Christ <jchrist@linux.ibm.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18862)
-rw-r--r-- | crypto/modes/gcm128.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/modes/gcm128.c b/crypto/modes/gcm128.c index e6e3455fd0..22ce8500b6 100644 --- a/crypto/modes/gcm128.c +++ b/crypto/modes/gcm128.c @@ -499,6 +499,11 @@ static void gcm_get_funcs(struct gcm_funcs_st *ctx) } return; #endif +#if defined(__s390__) || defined(__s390x__) + ctx->gmult = gcm_gmult_4bit; + ctx->ghash = gcm_ghash_4bit; + return; +#endif } void CRYPTO_gcm128_init(GCM128_CONTEXT *ctx, void *key, block128_f block) |