xref: /netbsd-src/crypto/external/bsd/openssl/dist/test/recipes/04-test_provider.t (revision 0e2e28bced52bda3788c857106bde6c44d2df3b8)
1b0d17251Schristos#! /usr/bin/env perl
2b0d17251Schristos# Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved.
3b0d17251Schristos#
4b0d17251Schristos# Licensed under the Apache License 2.0 (the "License").  You may not use
5b0d17251Schristos# this file except in compliance with the License.  You can obtain a copy
6b0d17251Schristos# in the file LICENSE in the source distribution or at
7b0d17251Schristos# https://www.openssl.org/source/license.html
8b0d17251Schristos
9b0d17251Schristosuse strict;
10b0d17251Schristosuse OpenSSL::Test qw(:DEFAULT bldtop_dir);
11b0d17251Schristosuse OpenSSL::Test::Utils;
12b0d17251Schristos
13b0d17251Schristossetup("test_provider");
14b0d17251Schristos
15*0e2e28bcSchristosplan tests => 3;
16b0d17251Schristos
17b0d17251Schristosok(run(test(['provider_test'])), "provider_test");
18b0d17251Schristos
19b0d17251Schristos$ENV{"OPENSSL_MODULES"} = bldtop_dir("test");
20b0d17251Schristos
21b0d17251Schristosok(run(test(['provider_test', '-loaded'])), "provider_test -loaded");
22*0e2e28bcSchristos
23*0e2e28bcSchristos SKIP: {
24*0e2e28bcSchristos     skip "no module support", 1 if disabled("module");
25*0e2e28bcSchristos
26*0e2e28bcSchristos     ok(run(app(['openssl', 'list', '-provider', 'p_minimal',
27*0e2e28bcSchristos                 '-providers', '-verbose'])));
28*0e2e28bcSchristos}
29