]> git.ipfire.org Git - thirdparty/openssl.git/blame - test/recipes/90-test_sslapi.t
SM4 optimization for ARM by ASIMD
[thirdparty/openssl.git] / test / recipes / 90-test_sslapi.t
CommitLineData
8f09ba47 1#! /usr/bin/env perl
8020d79b 2# Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved.
8f09ba47 3#
909f1a2e 4# Licensed under the Apache License 2.0 (the "License"). You may not use
8f09ba47
MC
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
8f09ba47 10use OpenSSL::Test::Utils;
5e30f2fd 11use OpenSSL::Test qw/:DEFAULT srctop_file srctop_dir bldtop_dir bldtop_file/;
76fd7a1d 12use File::Temp qw(tempfile);
8f09ba47 13
5e30f2fd 14BEGIN {
2cb4b5f6 15setup("test_sslapi");
5e30f2fd
MC
16}
17
18use lib srctop_dir('Configurations');
19use lib bldtop_dir('.');
5e30f2fd 20
4f6c7044 21my $no_fips = disabled('fips') || ($ENV{NO_FIPS} // 0);
8f09ba47
MC
22
23plan skip_all => "No TLS/SSL protocols are supported by this OpenSSL build"
24 if alldisabled(grep { $_ ne "ssl3" } available_protocols("tls"));
25
4f6c7044 26plan tests =>
e25b4db7 27 ($no_fips ? 0 : 1) # sslapitest with fips
4f6c7044 28 + 1; # sslapitest with default provider
8f09ba47 29
76fd7a1d
MC
30(undef, my $tmpfilename) = tempfile();
31
1a2a3a42 32ok(run(test(["sslapitest", srctop_dir("test", "certs"),
76fd7a1d 33 srctop_file("test", "recipes", "90-test_sslapi_data",
5e30f2fd
MC
34 "passwd.txt"), $tmpfilename, "default",
35 srctop_file("test", "default.cnf")])),
76fd7a1d
MC
36 "running sslapitest");
37
4f6c7044 38unless ($no_fips) {
4f6c7044
MC
39 ok(run(test(["sslapitest", srctop_dir("test", "certs"),
40 srctop_file("test", "recipes", "90-test_sslapi_data",
41 "passwd.txt"), $tmpfilename, "fips",
7192e4df 42 srctop_file("test", "fips-and-base.cnf")])),
4f6c7044
MC
43 "running sslapitest");
44}
45
76fd7a1d 46unlink $tmpfilename;