]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
80-test_cms.t: Accept success in malformed RSA decryption
authorTomas Mraz <tomas@openssl.foundation>
Mon, 6 Apr 2026 20:09:20 +0000 (22:09 +0200)
committerTomas Mraz <tomas@openssl.foundation>
Mon, 6 Apr 2026 20:09:24 +0000 (22:09 +0200)
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

test/recipes/80-test_cms.t

index fae89c8797c40d933c7846048d6c5c8ee02da7db..152a1a55a0a1f0aff9982aec9b7c08b726228a9f 100644 (file)
@@ -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"])),