]> git.ipfire.org Git - thirdparty/openssl.git/blame - test/recipes/15-test_dsa.t
tests: reinstate tests for deprecated but non-removed functionality
[thirdparty/openssl.git] / test / recipes / 15-test_dsa.t
CommitLineData
596d6b7e 1#! /usr/bin/env perl
1212818e 2# Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved.
596d6b7e 3#
909f1a2e 4# Licensed under the Apache License 2.0 (the "License"). You may not use
596d6b7e
RS
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
0c85cc50
RL
9
10use strict;
11use warnings;
12
13use File::Spec;
42e0ccdf 14use OpenSSL::Test qw/:DEFAULT srctop_file/;
340166a9 15use OpenSSL::Test::Utils;
0c85cc50
RL
16
17setup("test_dsa");
18
c15c538a
RL
19plan skip_all => 'DSA is not supported in this build' if disabled('dsa');
20plan tests => 7;
21
42e0ccdf 22require_ok(srctop_file('test','recipes','tconversion.pl'));
0c85cc50 23
b0cfe526
P
24ok(run(test(["dsatest"])), "running dsatest");
25ok(run(test(["dsa_no_digest_size_test"])),
26 "running dsa_no_digest_size_test");
27
28subtest "dsa conversions using 'openssl dsa' -- private key" => sub {
29 tconversion("dsa", srctop_file("test","testdsa.pem"));
30};
31subtest "dsa conversions using 'openssl dsa' -- public key" => sub {
32 tconversion("msb", srctop_file("test","testdsapub.pem"), "dsa",
33 "-pubin", "-pubout");
34};
c15c538a
RL
35
36subtest "dsa conversions using 'openssl pkey' -- private key PKCS#8" => sub {
37 tconversion("dsa", srctop_file("test","testdsa.pem"), "pkey");
38};
39subtest "dsa conversions using 'openssl pkey' -- public key" => sub {
40 tconversion("dsa", srctop_file("test","testdsapub.pem"), "pkey",
41 "-pubin", "-pubout");
42};