summaryrefslogtreecommitdiff
path: root/test/recipes/04-test_pem.t
diff options
context:
space:
mode:
Diffstat (limited to 'test/recipes/04-test_pem.t')
-rw-r--r--test/recipes/04-test_pem.t9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/recipes/04-test_pem.t b/test/recipes/04-test_pem.t
index 291f2ba3da..23d1ef8a93 100644
--- a/test/recipes/04-test_pem.t
+++ b/test/recipes/04-test_pem.t
@@ -76,7 +76,7 @@ my %dsa_expected = (
"dsa.pem" => 1
);
-plan tests => scalar keys(%cert_expected) + scalar keys(%dsa_expected);
+plan tests => scalar keys(%cert_expected) + scalar keys(%dsa_expected) + 1;
foreach my $input (keys %cert_expected) {
my @common = ($cmd, "x509", "-text", "-noout", "-inform", "PEM", "-in");
@@ -93,3 +93,10 @@ SKIP: {
is((scalar @match > 0 ? 1 : 0), $dsa_expected{$input});
}
}
+SKIP: {
+ skip "RSA support disabled, skipping...", 1 unless !disabled("rsa");
+ my @common = ($cmd, "pkey", "-inform", "PEM", "-noout", "-text", "-in");
+ my @data = run(app([@common, data_file("beermug.pem")], stderr => undef), capture => 1);
+ my @match = grep /00:a0:3a:21:14:5d:cd:b6:d5:a0:3e:49:23:c1:3a:/, @data;
+ ok(scalar @match > 0 ? 1 : 0);
+}