Blame test/recipes/90-test_gost.t

Packit c4476c
#! /usr/bin/env perl
Packit c4476c
# Copyright 2018-2019 The OpenSSL Project Authors. All Rights Reserved.
Packit c4476c
#
Packit c4476c
# Licensed under the OpenSSL license (the "License").  You may not use
Packit c4476c
# this file except in compliance with the License.  You can obtain a copy
Packit c4476c
# in the file LICENSE in the source distribution or at
Packit c4476c
# https://www.openssl.org/source/license.html
Packit c4476c
Packit c4476c
use OpenSSL::Test::Utils;
Packit c4476c
use OpenSSL::Test qw/:DEFAULT srctop_file/;
Packit c4476c
Packit c4476c
setup("test_gost");
Packit c4476c
Packit c4476c
# The GOST ciphers are dynamically loaded via the GOST engine, so we must be
Packit c4476c
# able to support that. The engine also uses DSA, CMS and CMAC symbols, so we
Packit c4476c
# skip this test on no-dsa, no-cms or no-cmac.
Packit c4476c
plan skip_all => "GOST support is disabled in this OpenSSL build"
Packit c4476c
    if disabled("gost") || disabled("engine") || disabled("dynamic-engine")
Packit c4476c
       || disabled("dsa") || disabled("cms") || disabled("cmac");
Packit c4476c
Packit c4476c
plan skip_all => "TLSv1.3 or TLSv1.2 are disabled in this OpenSSL build"
Packit c4476c
    if disabled("tls1_3") || disabled("tls1_2");
Packit c4476c
Packit c4476c
plan skip_all => "No test GOST engine found"
Packit c4476c
    if !$ENV{OPENSSL_GOST_ENGINE_SO};
Packit c4476c
Packit c4476c
plan tests => 1;
Packit c4476c
Packit c4476c
$ENV{OPENSSL_CONF} = srctop_file("test", "recipes", "90-test_gost_data",
Packit c4476c
                                 "gost.conf");
Packit c4476c
Packit c4476c
ok(run(test(["gosttest",
Packit c4476c
             srctop_file("test", "recipes", "90-test_gost_data",
Packit c4476c
                         "server-cert2001.pem"),
Packit c4476c
             srctop_file("test", "recipes", "90-test_gost_data",
Packit c4476c
                         "server-key2001.pem"),
Packit c4476c
             srctop_file("test", "recipes", "90-test_gost_data",
Packit c4476c
                         "server-cert2012.pem"),
Packit c4476c
             srctop_file("test", "recipes", "90-test_gost_data",
Packit c4476c
                         "server-key2012.pem")])),
Packit c4476c
             "running gosttest");