diff options
author | Aleksey Sanin <aleksey@aleksey.com> | 2023-03-20 11:26:50 -0400 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2023-03-23 11:09:17 +1100 |
commit | 438068674b95b38892d2d1790b3fd14e3112d0cb (patch) | |
tree | 178da11bff8f0b578d5068195fe51fe8cca31e59 /test | |
parent | 535ddd37524217143eb710bc880ee8c60b7a6cf8 (diff) | |
download | openssl-new-438068674b95b38892d2d1790b3fd14e3112d0cb.tar.gz |
Added tests and updated help
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19898)
Diffstat (limited to 'test')
-rw-r--r-- | test/recipes/15-test_gendsa.t | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/test/recipes/15-test_gendsa.t b/test/recipes/15-test_gendsa.t index 00423ce12f..b4bb9b29ca 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 - + 13; + + 18; ok(run(app([ 'openssl', 'genpkey', '-genparam', '-algorithm', 'DSA', @@ -115,6 +115,43 @@ ok(!run(app(["openssl", "gendsa", 'dsagen.pem', "-verbose"])), "gendsa with extra parameter (at end) should fail"); +# test key generation with dsaparam tool +ok(run(app([ 'openssl', 'dsaparam', + '-genkey', + '-text', + '1024', + ])), + "dsaparam -genkey DSA 1024 with default qbits"); + +ok(run(app([ 'openssl', 'dsaparam', + '-genkey', + '-text', + '2048', + ])), + "dsaparam -genkey DSA 2048 with default qbits"); + +ok(run(app([ 'openssl', 'dsaparam', + '-genkey', + '-text', + '1024', '160', + ])), + "dsaparam -genkey DSA 1024 with 160 qbits"); + +ok(run(app([ 'openssl', 'dsaparam', + '-genkey', + '-text', + '2048', '224', + ])), + "dsaparam -genkey DSA 2048 with 224 qbits"); + +ok(run(app([ 'openssl', 'dsaparam', + '-genkey', + '-text', + '2048', '256', + ])), + "dsaparam -genkey DSA 2048 with 256 qbits"); +# genkey test for 3072 bits keys were removed to speed up the tests + unless ($no_fips) { my $provconf = srctop_file("test", "fips-and-base.cnf"); my $provpath = bldtop_dir("providers"); |