]>
Commit | Line | Data |
---|---|---|
596d6b7e RS |
1 | #! /usr/bin/env perl |
2 | # Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved. | |
3 | # | |
4 | # Licensed under the OpenSSL license (the "License"). You may not use | |
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 | |
10 | use strict; | |
11 | use warnings; | |
12 | ||
13 | use File::Spec; | |
42e0ccdf | 14 | use OpenSSL::Test qw/:DEFAULT srctop_file/; |
340166a9 | 15 | use OpenSSL::Test::Utils; |
0c85cc50 RL |
16 | |
17 | setup("test_rsa"); | |
18 | ||
19 | plan tests => 5; | |
20 | ||
42e0ccdf | 21 | require_ok(srctop_file('test','recipes','tconversion.pl')); |
0c85cc50 RL |
22 | |
23 | ok(run(test(["rsa_test"])), "running rsatest"); | |
24 | ||
25 | SKIP: { | |
26 | skip "Skipping rsa conversion test", 3 | |
340166a9 | 27 | if disabled("rsa"); |
0c85cc50 RL |
28 | |
29 | subtest 'rsa conversions -- private key' => sub { | |
42e0ccdf | 30 | tconversion("rsa", srctop_file("test","testrsa.pem")); |
0c85cc50 RL |
31 | }; |
32 | subtest 'rsa conversions -- private key PKCS#8' => sub { | |
42e0ccdf | 33 | tconversion("rsa", srctop_file("test","testrsa.pem"), "pkey"); |
0c85cc50 RL |
34 | }; |
35 | subtest 'rsa conversions -- public key' => sub { | |
42e0ccdf | 36 | tconversion("rsa", srctop_file("test","testrsapub.pem"), "rsa", |
0c85cc50 RL |
37 | "-pubin", "-pubout"); |
38 | }; | |
39 | } |