diff options
Diffstat (limited to 'test/recipes/80-test_cms.t')
-rw-r--r-- | test/recipes/80-test_cms.t | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/test/recipes/80-test_cms.t b/test/recipes/80-test_cms.t index 01947b4977..dba5b52b60 100644 --- a/test/recipes/80-test_cms.t +++ b/test/recipes/80-test_cms.t @@ -13,7 +13,7 @@ use warnings; use POSIX; use File::Spec::Functions qw/catfile/; use File::Compare qw/compare_text compare/; -use OpenSSL::Test qw/:DEFAULT srctop_dir srctop_file bldtop_dir bldtop_file/; +use OpenSSL::Test qw/:DEFAULT srctop_dir srctop_file bldtop_dir bldtop_file with/; use OpenSSL::Test::Utils; @@ -50,7 +50,7 @@ my ($no_des, $no_dh, $no_dsa, $no_ec, $no_ec2m, $no_rc2, $no_zlib) $no_rc2 = 1 if disabled("legacy"); -plan tests => 17; +plan tests => 18; ok(run(test(["pkcs7_test"])), "test pkcs7"); @@ -1110,3 +1110,14 @@ ok(!run(app(['openssl', 'cms', '-verify', "SignedInvalidMappingFromanyPolicyTest7.eml") ])), "issue#19643"); + +# Check that we get the expected failure return code +with({ exit_checker => sub { return shift == 6; } }, + sub { + ok(run(app(['openssl', 'cms', '-encrypt', + '-in', srctop_file("test", "smcont.txt"), + '-stream', '-recip', + srctop_file("test/smime-certs", "badrsa.pem"), + ])), + "Check failure during BIO setup with -stream is handled correctly"); + }); |