diff options
Diffstat (limited to 'test/recipes/25-test_req.t')
-rw-r--r-- | test/recipes/25-test_req.t | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/test/recipes/25-test_req.t b/test/recipes/25-test_req.t index 1a6efa8be2..662109c896 100644 --- a/test/recipes/25-test_req.t +++ b/test/recipes/25-test_req.t @@ -15,7 +15,7 @@ use OpenSSL::Test qw/:DEFAULT srctop_file/; setup("test_req"); -plan tests => 15; +plan tests => 16; require_ok(srctop_file('test','recipes','tconversion.pl')); @@ -42,6 +42,34 @@ ok(!run(app([@addext_args, "-addext", $val, "-addext", $val2]))); ok(!run(app([@addext_args, "-addext", $val, "-addext", $val3]))); ok(!run(app([@addext_args, "-addext", $val2, "-addext", $val3]))); +subtest "generating alt certificate requests with RSA" => sub { + plan tests => 3; + + SKIP: { + skip "RSA is not supported by this OpenSSL build", 2 + if disabled("rsa"); + + ok(run(app(["openssl", "req", + "-config", srctop_file("test", "test.cnf"), + "-section", "altreq", + "-new", "-out", "testreq-rsa.pem", "-utf8", + "-key", srctop_file("test", "testrsa.pem")])), + "Generating request"); + + ok(run(app(["openssl", "req", + "-config", srctop_file("test", "test.cnf"), + "-verify", "-in", "testreq-rsa.pem", "-noout"])), + "Verifying signature on request"); + + ok(run(app(["openssl", "req", + "-config", srctop_file("test", "test.cnf"), + "-section", "altreq", + "-verify", "-in", "testreq-rsa.pem", "-noout"])), + "Verifying signature on request"); + } +}; + + subtest "generating certificate requests with RSA" => sub { plan tests => 2; |