diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2022-01-07 12:44:27 +0100 |
---|---|---|
committer | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2022-01-08 13:03:27 +0100 |
commit | 79fc479baf848e91a991a215d775d8aae844fbe5 (patch) | |
tree | f888278f212f473111fae266a1da108027c666dc /test | |
parent | e33f05660447c69e89f2e9f5d3140a56322411d5 (diff) |
Add a test case for the short password
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17441)
(cherry picked from commit 21095479c016f2ceaca0f71078fd27f0e9ba9375)
Diffstat (limited to 'test')
-rw-r--r-- | test/recipes/15-test_genrsa.t | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/recipes/15-test_genrsa.t b/test/recipes/15-test_genrsa.t index e11ce8947a..1bba712863 100644 --- a/test/recipes/15-test_genrsa.t +++ b/test/recipes/15-test_genrsa.t @@ -25,7 +25,7 @@ my $no_fips = disabled('fips') || ($ENV{NO_FIPS} // 0); plan tests => ($no_fips ? 0 : 3) # Extra FIPS related tests - + 13; + + 15; # We want to know that an absurdly small number of bits isn't support is(run(app([ 'openssl', 'genpkey', '-out', 'genrsatest.pem', @@ -103,6 +103,11 @@ ok(run(app([ 'openssl', 'genrsa', '-f4', '-out', 'genrsatest.pem', $good ])), "genrsa -f4 $good"); ok(run(app([ 'openssl', 'rsa', '-check', '-in', 'genrsatest.pem', '-noout' ])), "rsa -check"); +ok(run(app([ 'openssl', 'rsa', '-in', 'genrsatest.pem', '-out', 'genrsatest-enc.pem', + '-aes256', '-passout', 'pass:x' ])), + "rsa encrypt"); +ok(run(app([ 'openssl', 'rsa', '-in', 'genrsatest-enc.pem', '-passin', 'pass:x' ])), + "rsa decrypt"); unless ($no_fips) { my $provconf = srctop_file("test", "fips-and-base.cnf"); |