Commit 7b5ece69de for openssl.org
commit 7b5ece69dee3fb78fcd2618df3bce5064a04c6dc
Author: Tomas Mraz <tomas@openssl.foundation>
Date: Mon Apr 6 22:09:20 2026 +0200
80-test_cms.t: Accept success in malformed RSA decryption
The decryption of the malformed encrypted message might succeed
with some probability. We accept that as the testcase tries to
trigger a crash which does not happen.
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Tue Apr 7 07:16:44 2026
diff --git a/test/recipes/80-test_cms.t b/test/recipes/80-test_cms.t
index fae89c8797..152a1a55a0 100644
--- a/test/recipes/80-test_cms.t
+++ b/test/recipes/80-test_cms.t
@@ -1412,7 +1412,7 @@ my $smrsacert = catfile($smdir, "smrsa3.pem");
my $smrsakey = catfile($smdir, "smrsa3-key.pem");
# Test case for CVE-2026-28390
-with({ exit_checker => sub { return shift == 4; } },
+with({ exit_checker => sub { my $ret = shift; return $ret == 4 || $ret == 0; } },
sub {
ok(run(app(["openssl", "cms", @prov, "-decrypt", "-in", $smcont_malformed, "-inform",
"DER", "-recip", $smrsacert, "-inkey", $smrsakey, "-out", "{output}.cms"])),