]>
Commit | Line | Data |
---|---|---|
9aa78c36 MC |
1 | #! /usr/bin/env perl |
2 | # Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. | |
3 | # | |
4 | # Licensed under the Apache License 2.0 (the "License"). You may not use | |
5 | # this file except in compliance with the License. You can obtain a copy | |
6 | # in the file LICENSE in the source distribution or at | |
7 | # https://www.openssl.org/source/license.html | |
8 | ||
9 | ||
10 | use OpenSSL::Test::Utils; | |
beb958cc | 11 | use OpenSSL::Test qw/:DEFAULT srctop_file srctop_dir bldtop_file bldtop_dir/; |
9aa78c36 | 12 | |
beb958cc | 13 | BEGIN { |
9aa78c36 | 14 | setup("test_sslprovider"); |
beb958cc MC |
15 | } |
16 | ||
17 | use lib srctop_dir('Configurations'); | |
18 | use lib bldtop_dir('.'); | |
19 | use platform; | |
9aa78c36 MC |
20 | |
21 | plan skip_all => "No TLS/SSL protocols are supported by this OpenSSL build" | |
22 | if alldisabled(grep { $_ ne "ssl3" } available_protocols("tls")); | |
23 | ||
beb958cc MC |
24 | plan tests => 3; |
25 | ||
26 | $ENV{OPENSSL_MODULES} = bldtop_dir("providers"); | |
27 | $ENV{OPENSSL_CONF_INCLUDE} = bldtop_dir("providers"); | |
28 | ||
29 | SKIP: { | |
30 | skip "Skipping FIPS installation", 1 | |
31 | if disabled("fips"); | |
9aa78c36 | 32 | |
ae6b654b | 33 | ok(run(perltest(['fipsinstall.pl', bldtop_dir()])), |
beb958cc MC |
34 | "fipsinstall"); |
35 | } | |
36 | ||
37 | ok(run(test(["sslprovidertest", srctop_dir("test", "certs"), "default", | |
38 | srctop_file("test", "default.cnf")])), | |
9aa78c36 | 39 | "running sslprovidertest"); |
beb958cc MC |
40 | |
41 | SKIP: { | |
42 | skip "Skipping FIPS provider test", 1 | |
43 | if disabled("fips"); | |
44 | ||
45 | ok(run(test(["sslprovidertest", srctop_dir("test", "certs"), "fips", | |
46 | srctop_file("test", "fips.cnf")])), | |
47 | "running sslprovidertest"); | |
48 | } |