80-test_cms.t (1.1.1.6) | 80-test_cms.t (1.1.1.7) |
---|---|
1#! /usr/bin/env perl 2# Copyright 2015-2023 The OpenSSL Project Authors. All Rights Reserved. 3# 4# Licensed under the Apache License 2.0 (the "License"). You may not use 5# this file except in compliance with the License. You can obtain a copy 6# in the file LICENSE in the source distribution or at 7# https://www.openssl.org/source/license.html 8 --- 36 unchanged lines hidden (view full) --- 45my $smdir = srctop_dir("test", "smime-certs"); 46my $smcont = srctop_file("test", "smcont.txt"); 47my $smcont_zero = srctop_file("test", "smcont_zero.txt"); 48my ($no_des, $no_dh, $no_dsa, $no_ec, $no_ec2m, $no_rc2, $no_zlib) 49 = disabled qw/des dh dsa ec ec2m rc2 zlib/; 50 51$no_rc2 = 1 if disabled("legacy"); 52 | 1#! /usr/bin/env perl 2# Copyright 2015-2023 The OpenSSL Project Authors. All Rights Reserved. 3# 4# Licensed under the Apache License 2.0 (the "License"). You may not use 5# this file except in compliance with the License. You can obtain a copy 6# in the file LICENSE in the source distribution or at 7# https://www.openssl.org/source/license.html 8 --- 36 unchanged lines hidden (view full) --- 45my $smdir = srctop_dir("test", "smime-certs"); 46my $smcont = srctop_file("test", "smcont.txt"); 47my $smcont_zero = srctop_file("test", "smcont_zero.txt"); 48my ($no_des, $no_dh, $no_dsa, $no_ec, $no_ec2m, $no_rc2, $no_zlib) 49 = disabled qw/des dh dsa ec ec2m rc2 zlib/; 50 51$no_rc2 = 1 if disabled("legacy"); 52 |
53plan tests => 16; | 53plan tests => 18; |
54 55ok(run(test(["pkcs7_test"])), "test pkcs7"); 56 57unless ($no_fips) { 58 @config = ( "-config", srctop_file("test", "fips-and-base.cnf") ); 59 $provname = 'fips'; 60} 61 --- 927 unchanged lines hidden (view full) --- 989 sub { 990 ok(run(app(['openssl', 'cms', '-encrypt', 991 '-in', srctop_file("test", "smcont.txt"), 992 '-aes128', '-stream', '-recip', 993 srctop_file("test/smime-certs", "badrsa.pem"), 994 ])), 995 "Check failure during BIO setup with -stream is handled correctly"); 996 }); | 54 55ok(run(test(["pkcs7_test"])), "test pkcs7"); 56 57unless ($no_fips) { 58 @config = ( "-config", srctop_file("test", "fips-and-base.cnf") ); 59 $provname = 'fips'; 60} 61 --- 927 unchanged lines hidden (view full) --- 989 sub { 990 ok(run(app(['openssl', 'cms', '-encrypt', 991 '-in', srctop_file("test", "smcont.txt"), 992 '-aes128', '-stream', '-recip', 993 srctop_file("test/smime-certs", "badrsa.pem"), 994 ])), 995 "Check failure during BIO setup with -stream is handled correctly"); 996 }); |
997 998# Test case for return value mis-check reported in #21986 999with({ exit_checker => sub { return shift == 3; } }, 1000 sub { 1001 SKIP: { 1002 skip "DSA is not supported in this build", 1 if $no_dsa; 1003 1004 ok(run(app(['openssl', 'cms', '-sign', 1005 '-in', srctop_file("test", "smcont.txt"), 1006 '-signer', srctop_file("test/smime-certs", "smdsa1.pem"), 1007 '-md', 'SHAKE256'])), 1008 "issue#21986"); 1009 } 1010 }); 1011 1012# Test for problem reported in #22225 1013with({ exit_checker => sub { return shift == 3; } }, 1014 sub { 1015 ok(run(app(['openssl', 'cms', '-encrypt', 1016 '-in', srctop_file("test", "smcont.txt"), 1017 '-aes-256-ctr', '-recip', 1018 catfile($smdir, "smec1.pem"), 1019 ])), 1020 "Check for failure when cipher does not have an assigned OID (issue#22225)"); 1021 }); |
|