summaryrefslogtreecommitdiffstats
path: root/providers
diff options
context:
space:
mode:
authorJerry Shih <bignose1007@gmail.com>2023-09-25 09:13:07 +0800
committerHugo Landau <hlandau@openssl.org>2023-10-26 15:55:50 +0100
commit7468a3db137bd22dacbcced379b0711986b57067 (patch)
tree051268602b055d4892f01cd4b96352e5cd3df625 /providers
parent18ed3a58b01f8f1affdedced1f4f62447b7df9f9 (diff)
Minor changes of the GCM-related code.
Unify the return value for `CRYPTO_gcm128_decrypt` as `CRYPTO_gcm128_encrypt`. Signed-off-by: Jerry Shih <jerry.shih@sifive.com> Signed-off-by: Phoebe Chen <phoebe.chen@sifive.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21923)
Diffstat (limited to 'providers')
-rw-r--r--providers/implementations/ciphers/cipher_aes_gcm_hw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/providers/implementations/ciphers/cipher_aes_gcm_hw.c b/providers/implementations/ciphers/cipher_aes_gcm_hw.c
index 4830cdc1b2..8f3c4870fd 100644
--- a/providers/implementations/ciphers/cipher_aes_gcm_hw.c
+++ b/providers/implementations/ciphers/cipher_aes_gcm_hw.c
@@ -99,7 +99,7 @@ static int generic_aes_gcm_cipher_update(PROV_GCM_CTX *ctx, const unsigned char
size_t res = (16 - ctx->gcm.mres) % 16;
if (CRYPTO_gcm128_decrypt(&ctx->gcm, in, out, res))
- return -1;
+ return 0;
bulk = AES_gcm_decrypt(in + res, out + res, len - res,
ctx->gcm.key,