]> git.ipfire.org Git - thirdparty/openssl.git/blob - test/recipes/15-test_ec.t
Change OpenSSL::Test to be an extension of Test::More
[thirdparty/openssl.git] / test / recipes / 15-test_ec.t
1 #! /usr/bin/perl
2
3 use strict;
4 use warnings;
5
6 use File::Spec;
7 use OpenSSL::Test qw/:DEFAULT top_file/;
8
9 setup("test_ec");
10
11 plan tests => 5;
12
13 require_ok(top_file('test','recipes','tconversion.pl'));
14
15 ok(run(test(["ectest"])), "running ectest");
16
17 SKIP: {
18 skip "Skipping ec conversion test", 3
19 if run(app(["openssl","no-ec"], stdout => undef));
20
21 subtest 'ec conversions -- private key' => sub {
22 tconversion("ec", top_file("test","testec-p256.pem"));
23 };
24 subtest 'ec conversions -- private key PKCS#8' => sub {
25 tconversion("ec", top_file("test","testec-p256.pem"), "pkey");
26 };
27 subtest 'ec conversions -- public key' => sub {
28 tconversion("ec", top_file("test","testecpub-p256.pem"), "ec", "-pubin", "-pubout");
29 };
30 }