ECDSA with SHA3 verification does not depend on FIPS provider version
[openssl.git] / test / recipes / 01-test_fipsmodule_cnf.t
1 #! /usr/bin/env perl
2 # Copyright 2021 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 # This is a sanity checker to see that the fipsmodule.cnf that's been
10 # generated for testing is valid.
11
12 use strict;
13 use warnings;
14
15 use OpenSSL::Test qw/:DEFAULT srctop_dir bldtop_dir bldtop_file srctop_file data_file/;
16 use OpenSSL::Test::Utils;
17
18 BEGIN {
19     setup("test_fipsmodule");
20 }
21
22 use lib srctop_dir('Configurations');
23 use lib bldtop_dir('.');
24 use platform;
25
26 my $no_check = disabled("fips");
27 plan skip_all => "Test only supported in a fips build"
28     if $no_check;
29 plan tests => 1;
30
31 my $fipsmodule = bldtop_file('providers', platform->dso('fips'));
32 my $fipsmoduleconf = bldtop_file('test', 'fipsmodule.cnf');
33
34 # verify the $fipsconf file
35 ok(run(app(['openssl', 'fipsinstall',
36             '-in',  $fipsmoduleconf, '-module', $fipsmodule, '-verify'])),
37    "fipsinstall verify");