summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorBernd Edlinger <bernd.edlinger@hotmail.de>2023-09-07 18:05:44 +0200
committerTomas Mraz <tomas@openssl.org>2024-05-06 10:13:20 +0200
commit6d2a01cdfb56fdb8ea5d5dd417724e6906c8b8e2 (patch)
tree12682e21834812c3de91f6142e1f6dfd8c9f147b /test
parentfedbfff42d790c7b7824351c35b4823c75da6417 (diff)
Fix error handling in CMS_EncryptedData_encrypt
That caused several memory leaks in case of error. Also when the CMS object that is created by CMS_EncryptedData_encrypt is not used in the normal way, but instead just deleted by CMS_ContentInfo_free some memory was lost. Fixes #21985 Reviewed-by: Todd Short <todd.short@me.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22031)
Diffstat (limited to 'test')
-rw-r--r--test/recipes/80-test_cms.t7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/recipes/80-test_cms.t b/test/recipes/80-test_cms.t
index 6a9792128b..07014945a7 100644
--- a/test/recipes/80-test_cms.t
+++ b/test/recipes/80-test_cms.t
@@ -394,6 +394,13 @@ my @smime_cms_tests = (
"-out", "{output}.txt" ],
\&final_compare
],
+
+ [ "encrypted content test streaming PEM format -noout, 128 bit AES key",
+ [ "{cmd1}", @prov, "-EncryptedData_encrypt", "-in", $smcont, "-outform", "PEM",
+ "-aes128", "-secretkey", "000102030405060708090A0B0C0D0E0F",
+ "-stream", "-noout" ],
+ [ "{cmd2}", @prov, "-help" ]
+ ],
);
my @smime_cms_cades_tests = (