[openssl/openssl] 5e5418: siv128.siv128.c: refactor encrypt/decrypt to a sin...

"'Abel Thomas' via openssl-commits" <[email protected]>
Newsgroups gmane.comp.encryption.openssl.cvs
Message-ID <openssl/openssl/push/refs/heads/openssl-4.0/[email protected]>
  Branch: refs/heads/openssl-4.0
  Home:   https://github.com/openssl/openssl
  Commit: 5e5418739734569d8170630d32d9de89bca77e0c
      https://github.com/openssl/openssl/commit/5e5418739734569d8170630d32d9de89bca77e0c
  Author: Abel Thomas <[email protected]>
  Date:   2026-08-27 (Thu, 27 Aug 2026)

  Changed paths:
    M crypto/modes/siv128.c
    M test/evp_extra_test.c

  Log Message:
  -----------
  siv128.siv128.c: refactor encrypt/decrypt to a single exit point

`ossl_siv128_encrypt()` and `ossl_siv128_decrypt()` previously set
`ctx->final_ret = 0` only on the success path, leaving it unmodified
on early returns. In speed mode, where the context is reused, this
caused `ossl_siv128_finish()` to return a stale success value after
a failed authentication.

Refactor both functions to use a single err: label exit point.
`final_ret_value` is initialised to -1 and set to 0 only on
success, then assigned to `ctx->final_ret` unconditionally on exit.

Added tests to verify the change.

Fixes #31584

Reviewed-by: Bob Beck <[email protected]>
Reviewed-by: Andrew Dinh <[email protected]>
Merge-date: Thu Aug 27 13:41:41 2026
Merged-from: https://github.com/openssl/openssl/pull/31610
(cherry picked from commit 031a8ccf6496f7b2468b9f4227059291d21683f8)



To unsubscribe from these emails, change your notification settings at https://github.com/openssl/openssl/settings/notifications

-- 
You received this message because you are subscribed to the Google Groups "openssl-commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/a/openssl.org/d/msgid/openssl-commits/openssl/openssl/push/refs/heads/openssl-4.0/cd1648-5e5418%40github.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.