[openssl/openssl] afa270: test: fix flaky -md and -iter mismatch checks in 2...

"'Pocs Norbert' via openssl-commits" <[email protected]> Mon, 27 Jul 2026 05:18:34 -0700
Newsgroups gmane.comp.encryption.openssl.cvs
Message-ID <openssl/openssl/push/refs/heads/master/[email protected]>
  Branch: refs/heads/master
  Home:   https://github.com/openssl/openssl
  Commit: afa270aa893f2e76d2db97f9b67f068ee28dacf8
      https://github.com/openssl/openssl/commit/afa270aa893f2e76d2db97f9b67=
f068ee28dacf8
  Author: Norbert Pocs <[email protected]>
  Date:   2026-07-27 (Mon, 27 Jul 2026)

  Changed paths:
    M test/recipes/20-test_enc.t

  Log Message:
  -----------
  test: fix flaky -md and -iter mismatch checks in 20-test_enc.t

The subtests added in f26d632a0e assert that "openssl enc -d" exits
non-zero when the key derivation parameters do not match.  enc has no
MAC, so a wrong key is not detectable as such; the only signal is
whether the garbage happens to form valid PKCS#7 padding, which
openssl-enc(1) documents as passing better than one time in 256.  With
a random salt the tests thus failed about 0.4% of the time.

Assert instead that mismatching parameters do not recover the
plaintext: the decryption must either fail or produce differing output.

Assisted-by: Claude:claude-opus-5[1m]

Signed-off-by: Norbert Pocs <[email protected]>

Reviewed-by: Eugene Syromiatnikov <[email protected]>
Reviewed-by: Sa=C5=A1a Nedv=C4=9Bdick=C3=BD <[email protected]>
Reviewed-by: Neil Horman <[email protected]>
MergeDate: Mon Jul 27 12:17:21 2026
(Merged from https://github.com/openssl/openssl/pull/32083)



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

--=20
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 e=
mail to [email protected].
To view this discussion visit https://groups.google.com/a/openssl.org/d/msg=
id/openssl-commits/openssl/openssl/push/refs/heads/master/47540a-afa270%40g=
ithub.com.