xref: /freebsd/crypto/openssl/test/recipes/20-test_cli_list.t (revision 88b8b7f0c4e9948667a2279e78e975a784049cba)
1#! /usr/bin/env perl
2# Copyright 2016-2025 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
9use strict;
10use warnings;
11
12use OpenSSL::Test qw/:DEFAULT bldtop_file srctop_file bldtop_dir with/;
13use OpenSSL::Test::Utils;
14
15setup("test_cli_list");
16
17plan tests => 2;
18
19ok(run(app(["openssl", "list", "-skey-managers"],
20        stdout => "listout.txt")),
21"List skey managers - default configuration");
22open DATA, "listout.txt";
23my @match = grep /secret key/, <DATA>;
24close DATA;
25ok(scalar @match > 1 ? 1 : 0, "Several skey managers are listed - default configuration");
26