diff options
author | Benjamin Kaduk <bkaduk@akamai.com> | 2017-02-23 16:22:10 -0600 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2017-02-28 21:23:26 +0100 |
commit | a00b9560f7ece1e51bd7a8dc6a7ffb7a3d20cf86 (patch) | |
tree | 5f34cffa764a54ce064362123d2eb29ff4ca6d7c /test/recipes/04-test_pem.t | |
parent | e8cee55718bb9cb957f449fbe7145a77f252bb73 (diff) | |
download | openssl-new-a00b9560f7ece1e51bd7a8dc6a7ffb7a3d20cf86.tar.gz |
Add AGL's "beer mug" PEM file as another test input
AGL has a history of pointing out the idiosynchronies/laxness of the
openssl PEM parser in amusing ways. If we want this functionality to
stay present, we should test that it works.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2756)
Diffstat (limited to 'test/recipes/04-test_pem.t')
-rw-r--r-- | test/recipes/04-test_pem.t | 9 |
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); +} |