30-test_provider_status.t 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #! /usr/bin/env perl
  2. # Copyright 2020 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. use strict;
  9. use warnings;
  10. use OpenSSL::Test qw(:DEFAULT data_file bldtop_dir srctop_file srctop_dir bldtop_file);
  11. use OpenSSL::Test::Utils;
  12. BEGIN {
  13. setup("test_provider_status");
  14. }
  15. use lib srctop_dir('Configurations');
  16. use lib bldtop_dir('.');
  17. use platform;
  18. my $no_fips = disabled('fips') || ($ENV{NO_FIPS} // 0);
  19. plan skip_all => "provider_status is not supported by this test"
  20. if $no_fips;
  21. plan tests => 2;
  22. my $infile = bldtop_file('providers', platform->dso('fips'));
  23. ok(run(app(['openssl', 'fipsinstall',
  24. '-out', bldtop_file('providers', 'fipsmodule.cnf'),
  25. '-module', $infile])),
  26. "fipsinstall");
  27. ok(run(test(["provider_status_test", "-config", srctop_file("test","fips.cnf"),
  28. "-provider_name", "fips"])),
  29. "running provider_status_test");