Pedro Monreal Gonzalez
5afc4138ca
- Use gcc-13 for ppc64le. OBS-URL: https://build.opensuse.org/package/show/security:tls/openssl-3?expand=0&rev=127
33 lines
1.3 KiB
Diff
33 lines
1.3 KiB
Diff
commit 017acc58f6b67d5b347db411a7a1c4e890434f42
|
|
Author: Holger Dengler <dengler@linux.ibm.com>
|
|
Date: Wed Sep 27 15:36:59 2023 +0200
|
|
|
|
Fix state handling of sha3_final for s390x.
|
|
|
|
The digest life-cycle state diagram has been updated for XOF. Fix the
|
|
state handling in s390x_sha3_final() according to the updated state
|
|
diagram.
|
|
|
|
Signed-off-by: Holger Dengler <dengler@linux.ibm.com>
|
|
|
|
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
|
|
Reviewed-by: Todd Short <todd.short@me.com>
|
|
Reviewed-by: Tomas Mraz <tomas@openssl.org>
|
|
(Merged from https://github.com/openssl/openssl/pull/22221)
|
|
|
|
Index: openssl-3.2.3/providers/implementations/digests/sha3_prov.c
|
|
===================================================================
|
|
--- openssl-3.2.3.orig/providers/implementations/digests/sha3_prov.c
|
|
+++ openssl-3.2.3/providers/implementations/digests/sha3_prov.c
|
|
@@ -202,6 +202,10 @@ static int s390x_sha3_final(void *vctx,
|
|
|
|
if (!ossl_prov_is_running())
|
|
return 0;
|
|
+ if (!(ctx->xof_state == XOF_STATE_INIT ||
|
|
+ ctx->xof_state == XOF_STATE_ABSORB))
|
|
+ return 0;
|
|
+ ctx->xof_state = XOF_STATE_FINAL;
|
|
s390x_klmd(ctx->buf, ctx->bufsz, NULL, 0, ctx->pad, ctx->A);
|
|
memcpy(out, ctx->A, outlen);
|
|
return 1;
|