diff options
| author | Shane Lontis <shane.lontis@oracle.com> | 2020-05-14 12:32:44 +1000 |
|---|---|---|
| committer | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-08-21 09:04:11 +0200 |
| commit | ab28b59064b3f46c7a62b540cd17cad718738108 (patch) | |
| tree | 2959690fe059a4fbf66b38661e94046aa91000af /test/recipes/65-test_cmp_server.t | |
| parent | 97e00da90282dddfc572c84d8468d85ab1925fba (diff) | |
| download | openssl-new-ab28b59064b3f46c7a62b540cd17cad718738108.tar.gz | |
Add libctx/provider support to cmp_server_test
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/11808)
Diffstat (limited to 'test/recipes/65-test_cmp_server.t')
| -rw-r--r-- | test/recipes/65-test_cmp_server.t | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/test/recipes/65-test_cmp_server.t b/test/recipes/65-test_cmp_server.t index 87dbdb10b2..5864163f01 100644 --- a/test/recipes/65-test_cmp_server.t +++ b/test/recipes/65-test_cmp_server.t @@ -9,10 +9,18 @@ # https://www.openssl.org/source/license.html use strict; -use OpenSSL::Test qw/:DEFAULT data_file/; +use OpenSSL::Test qw/:DEFAULT data_file srctop_file srctop_dir bldtop_file bldtop_dir/; use OpenSSL::Test::Utils; -setup("test_cmp_server"); +BEGIN { + setup("test_cmp_server"); +} + +use lib srctop_dir('Configurations'); +use lib bldtop_dir('.'); +use platform; + +my $no_fips = disabled('fips') || ($ENV{NO_FIPS} // 0); plan skip_all => "This test is not supported in a no-cmp build" if disabled("cmp"); @@ -20,7 +28,19 @@ plan skip_all => "This test is not supported in a no-cmp build" plan skip_all => "This test is not supported in a no-ec build" if disabled("ec"); -plan tests => 1; +plan tests => 2 + ($no_fips ? 0 : 2); #fips install + fips test + +my @basic_cmd = ("cmp_server_test", data_file("CR_protected_PBM_1234.der")); + +ok(run(test([@basic_cmd, "none"]))); + +ok(run(test([@basic_cmd, "default", srctop_file("test", "default.cnf")]))); + +unless ($no_fips) { + ok(run(app(['openssl', 'fipsinstall', + '-out', bldtop_file('providers', 'fipsmodule.cnf'), + '-module', bldtop_file('providers', platform->dso('fips'))])), + "fipsinstall"); -ok(run(test(["cmp_server_test", - data_file("CR_protected_PBM_1234.der")]))); + ok(run(test([@basic_cmd, "fips", srctop_file("test", "fips.cnf")]))); +} |
