summaryrefslogtreecommitdiff
path: root/test/recipes
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2023-01-27 14:31:45 +0100
committerTomas Mraz <tomas@openssl.org>2023-02-02 08:58:10 +0100
commit323c47532ea7fc79d5e28a0fa58ea0cc4d5196b8 (patch)
tree0736fe1860ae5bbf2324be354fcff733b248cc85 /test/recipes
parentfedab100a4b8f4c3b81de632f29c159fb46ac3f2 (diff)
downloadopenssl-new-323c47532ea7fc79d5e28a0fa58ea0cc4d5196b8.tar.gz
APPS/{storeutl,gendsa}: give error on extra arguments, improve doc
Point out that options must be given before the final file/URI arg. Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/20156)
Diffstat (limited to 'test/recipes')
-rw-r--r--test/recipes/15-test_gendsa.t10
-rw-r--r--test/recipes/90-test_store.t10
2 files changed, 18 insertions, 2 deletions
diff --git a/test/recipes/15-test_gendsa.t b/test/recipes/15-test_gendsa.t
index b495b08bda..00423ce12f 100644
--- a/test/recipes/15-test_gendsa.t
+++ b/test/recipes/15-test_gendsa.t
@@ -28,7 +28,7 @@ my $no_fips = disabled('fips') || ($ENV{NO_FIPS} // 0);
plan tests =>
($no_fips ? 0 : 2) # FIPS related tests
- + 11;
+ + 13;
ok(run(app([ 'openssl', 'genpkey', '-genparam',
'-algorithm', 'DSA',
@@ -107,6 +107,14 @@ ok(!run(app([ 'openssl', 'genpkey',
'-algorithm', 'DSA'])),
"genpkey DSA with no params should fail");
+ok(run(app(["openssl", "gendsa", "-verbose",
+ 'dsagen.pem'])),
+ "gendsa with -verbose option and dsagen parameter");
+
+ok(!run(app(["openssl", "gendsa",
+ 'dsagen.pem', "-verbose"])),
+ "gendsa with extra parameter (at end) should fail");
+
unless ($no_fips) {
my $provconf = srctop_file("test", "fips-and-base.cnf");
my $provpath = bldtop_dir("providers");
diff --git a/test/recipes/90-test_store.t b/test/recipes/90-test_store.t
index 3af8178e89..c0bf1d1bb0 100644
--- a/test/recipes/90-test_store.t
+++ b/test/recipes/90-test_store.t
@@ -106,7 +106,7 @@ push @methods, [ @prov_method ];
push @methods, [qw(-engine loader_attic)]
unless disabled('loadereng');
-my $n = scalar @methods
+my $n = 2 + scalar @methods
* ( (3 * scalar @noexist_files)
+ (6 * scalar @src_files)
+ (2 * scalar @data_files)
@@ -131,6 +131,14 @@ plan skip_all => "No plan" if $n == 0;
plan tests => $n;
+my $test_x509 = srctop_file('test', 'testx509.pem');
+
+ok(run(app(["openssl", "storeutl", "-crls", $test_x509])),
+ "storeutil with -crls option");
+
+ok(!run(app(["openssl", "storeutl", $test_x509, "-crls"])),
+ "storeutil with extra parameter (at end) should fail");
+
indir "store_$$" => sub {
if ($do_test_ossltest_store) {
# ossltest loads PEM files, with names prefixed with 'ot:'.