2 # Copyright 2016-2020 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"));
27 skip "Skipping FIPS installation", 1
30 ok(run(app(['openssl', 'fipsinstall',
31 '-out', bldtop_file('providers', 'fipsmodule.cnf'),
32 '-module', bldtop_file('providers', platform->dso('fips')),
33 '-provider_name', 'fips', '-mac_name', 'HMAC',
34 '-macopt', 'digest:SHA256', '-macopt', 'hexkey:00',
35 '-section_name', 'fips_sect'])),
39 ok(run(test(["sslprovidertest", srctop_dir("test", "certs"), "default",
40 srctop_file("test", "default.cnf")])),
41 "running sslprovidertest");
44 skip "Skipping FIPS provider test", 1
47 ok(run(test(["sslprovidertest", srctop_dir("test", "certs"), "fips",
48 srctop_file("test", "fips.cnf")])),
49 "running sslprovidertest");