2 # Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved.
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
10 use OpenSSL::Test::Utils;
11 use OpenSSL::Test qw/:DEFAULT srctop_file srctop_dir bldtop_file bldtop_dir/;
14 setup("test_sslprovider");
17 use lib srctop_dir('Configurations');
18 use lib bldtop_dir('.');
21 plan skip_all => "No TLS/SSL protocols are supported by this OpenSSL build"
22 if alldisabled(grep { $_ ne "ssl3" } available_protocols("tls"));
26 $ENV{OPENSSL_MODULES} = bldtop_dir("providers");
27 $ENV{OPENSSL_CONF_INCLUDE} = bldtop_dir("providers");
30 skip "Skipping FIPS installation", 1
33 ok(run(app(['openssl', 'fipsinstall',
34 '-out', bldtop_file('providers', 'fipsinstall.cnf'),
35 '-module', bldtop_file('providers', platform->dso('fips')),
36 '-provider_name', 'fips', '-mac_name', 'HMAC',
37 '-macopt', 'digest:SHA256', '-macopt', 'hexkey:00',
38 '-section_name', 'fips_sect'])),
42 ok(run(test(["sslprovidertest", srctop_dir("test", "certs"), "default",
43 srctop_file("test", "default.cnf")])),
44 "running sslprovidertest");
47 skip "Skipping FIPS provider test", 1
50 ok(run(test(["sslprovidertest", srctop_dir("test", "certs"), "fips",
51 srctop_file("test", "fips.cnf")])),
52 "running sslprovidertest");