Commit 0c85cc50 authored by Richard Levitte's avatar Richard Levitte
Browse files

Add asymetric cipher test recipes



Some of them make use of recipes/tconversion.pl.

Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
parent 904ae334
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
#! /usr/bin/perl

use strict;
use warnings;

use Test::More;
use OpenSSL::Test;

setup("test_dh");

plan tests => 1;
ok(run(test(["dhtest"])), "running dhtest");
+33 −0
Original line number Diff line number Diff line
#! /usr/bin/perl

use strict;
use warnings;

use File::Spec;
use Test::More;
use OpenSSL::Test qw/:DEFAULT top_file/;

setup("test_dsa");

plan tests => 6;

require_ok(top_file('test','recipes','tconversion.pl'));

ok(run(test(["dsatest"])), "running dsatest");
ok(run(test(["dsatest", "-app2_1"])), "running dsatest -app2_1");

 SKIP: {
     skip "Skipping dsa conversion test", 3
	 if run(app(["openssl","no-dsa"], stdout => undef));

     subtest 'dsa conversions -- private key' => sub {
	 tconversion("dsa", top_file("test","testdsa.pem"));
     };
     subtest 'dsa conversions -- private key PKCS#8' => sub {
	 tconversion("dsa", top_file("test","testdsa.pem"), "pkey");
     };
     subtest 'dsa conversions -- public key' => sub {
	 tconversion("dsa", top_file("test","testdsapub.pem"), "dsa",
		     "-pubin", "-pubout");
     };
}
+31 −0
Original line number Diff line number Diff line
#! /usr/bin/perl

use strict;
use warnings;

use File::Spec;
use Test::More;
use OpenSSL::Test qw/:DEFAULT top_file/;

setup("test_ec");

plan tests => 5;

require_ok(top_file('test','recipes','tconversion.pl'));

ok(run(test(["ectest"])), "running ectest");

 SKIP: {
     skip "Skipping ec conversion test", 3
	 if run(app(["openssl","no-ec"], stdout => undef));

     subtest 'ec conversions -- private key' => sub {
	 tconversion("ec", top_file("test","testec-p256.pem"));
     };
     subtest 'ec conversions -- private key PKCS#8' => sub {
	 tconversion("ec", top_file("test","testec-p256.pem"), "pkey");
     };
     subtest 'ec conversions -- public key' => sub {
	 tconversion("ec", top_file("test","testecpub-p256.pem"), "ec", "-pubin", "-pubout");
     };
}
+12 −0
Original line number Diff line number Diff line
#! /usr/bin/perl

use strict;
use warnings;

use Test::More;
use OpenSSL::Test;

setup("test_ecdh");

plan tests => 1;
ok(run(test(["ecdhtest"])), "running ecdhtest");
+12 −0
Original line number Diff line number Diff line
#! /usr/bin/perl

use strict;
use warnings;

use Test::More;
use OpenSSL::Test;

setup("test_ecdsa");

plan tests => 1;
ok(run(test(["ecdsatest"])), "running ecdsatest");
Loading