]> git.ipfire.org Git - thirdparty/openssl.git/blame - test/recipes/90-test_gost.t
Add test cases for the non CA certificate with pathlen:0
[thirdparty/openssl.git] / test / recipes / 90-test_gost.t
CommitLineData
1e839545
MC
1#! /usr/bin/env perl
2# Copyright 2018 The OpenSSL Project Authors. All Rights Reserved.
3#
909f1a2e 4# Licensed under the Apache License 2.0 (the "License"). You may not use
1e839545
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
9use OpenSSL::Test::Utils;
10use OpenSSL::Test qw/:DEFAULT srctop_file/;
11
12setup("test_gost");
13
910fff7e 14# The GOST ciphers are dynamically loaded via the GOST engine, so we must be
87bbbfb1
MC
15# able to support that. The engine also uses DSA, CMS and CMAC symbols, so we
16# skip this test on no-dsa, no-cms or no-cmac.
1e839545 17plan skip_all => "GOST support is disabled in this OpenSSL build"
910fff7e 18 if disabled("gost") || disabled("engine") || disabled("dynamic-engine")
87bbbfb1 19 || disabled("dsa") || disabled("cms") || disabled("cmac");
1e839545
MC
20
21plan skip_all => "TLSv1.3 or TLSv1.2 are disabled in this OpenSSL build"
22 if disabled("tls1_3") || disabled("tls1_2");
23
dbc6268f
MC
24plan skip_all => "EC is disabled in this OpenSSL build"
25 if disabled("ec");
26
27
1e839545
MC
28plan skip_all => "No test GOST engine found"
29 if !$ENV{OPENSSL_GOST_ENGINE_SO};
30
31plan tests => 1;
32
33$ENV{OPENSSL_CONF} = srctop_file("test", "recipes", "90-test_gost_data",
433deaff 34 "gost.cnf");
1e839545
MC
35
36ok(run(test(["gosttest",
37 srctop_file("test", "recipes", "90-test_gost_data",
38 "server-cert2001.pem"),
39 srctop_file("test", "recipes", "90-test_gost_data",
40 "server-key2001.pem"),
41 srctop_file("test", "recipes", "90-test_gost_data",
42 "server-cert2012.pem"),
43 srctop_file("test", "recipes", "90-test_gost_data",
44 "server-key2012.pem")])),
45 "running gosttest");