]>
Commit | Line | Data |
---|---|---|
63794b04 | 1 | #! /usr/bin/env perl |
8020d79b | 2 | # Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. |
63794b04 SL |
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 | use strict; | |
10 | use warnings; | |
11 | ||
12 | use OpenSSL::Test qw(:DEFAULT bldtop_dir srctop_dir srctop_file bldtop_file); | |
13 | use OpenSSL::Test::Utils; | |
14 | ||
15 | BEGIN { | |
16 | setup("test_evp_libctx"); | |
17 | } | |
18 | ||
2710ddef | 19 | my $no_legacy = disabled('legacy') || ($ENV{NO_LEGACY} // 0); |
63794b04 SL |
20 | my $no_fips = disabled('fips') || ($ENV{NO_FIPS} // 0); |
21 | ||
22 | use lib srctop_dir('Configurations'); | |
23 | use lib bldtop_dir('.'); | |
63794b04 | 24 | |
63794b04 SL |
25 | # If no fips then run the test with no extra arguments. |
26 | my @test_args = ( ); | |
27 | ||
2710ddef | 28 | plan tests => ($no_fips ? 0 : 1) + ($no_legacy ? 0 : 1) + 1; |
63794b04 SL |
29 | |
30 | unless ($no_fips) { | |
122e81f0 | 31 | @test_args = ("-config", srctop_file("test","fips-and-base.cnf"), |
63794b04 SL |
32 | "-provider", "fips"); |
33 | ||
90409da6 | 34 | ok(run(test(["evp_libctx_test", @test_args])), "running fips evp_libctx_test"); |
63794b04 SL |
35 | } |
36 | ||
90409da6 | 37 | ok(run(test(["evp_libctx_test", |
d5e8d260 | 38 | "-config", srctop_file("test","default.cnf"),])), |
2710ddef JS |
39 | "running default evp_libctx_test"); |
40 | ||
41 | unless ($no_legacy) { | |
42 | ok(run(test(["evp_libctx_test", | |
43 | "-config", srctop_file("test","default-and-legacy.cnf"),])), | |
44 | "running default-and-legacy evp_libctx_test"); | |
45 | } | |
46 |