diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/recipes/25-test_pkcs7.t | 15 | ||||
-rw-r--r-- | test/recipes/25-test_pkcs7_data/grfc.out | 31 |
2 files changed, 45 insertions, 1 deletions
diff --git a/test/recipes/25-test_pkcs7.t b/test/recipes/25-test_pkcs7.t index 37cd43dc6b..2905fe8fe0 100644 --- a/test/recipes/25-test_pkcs7.t +++ b/test/recipes/25-test_pkcs7.t @@ -15,10 +15,15 @@ use OpenSSL::Test qw/:DEFAULT srctop_file/; setup("test_pkcs7"); -plan tests => 3; +plan tests => 6; require_ok(srctop_file('test','recipes','tconversion.pl')); +my @path = qw(test certs); +my $pemfile = "grfc.pem"; +my $p7file = "grfc.p7b"; +my $out = "grfc.out"; + subtest 'pkcs7 conversions -- pkcs7' => sub { tconversion( -type => 'p7', -in => srctop_file("test", "testp7.pem"), -args => ["pkcs7"] ); @@ -27,3 +32,11 @@ subtest 'pkcs7 conversions -- pkcs7d' => sub { tconversion( -type => 'p7d', -in => srctop_file("test", "pkcs7-1.pem"), -args => ["pkcs7"] ); }; +ok(run(app(["openssl", "crl2pkcs7", "-nocrl", + "-certfile", srctop_file(@path, $pemfile), + "-out", $p7file]))); +ok(run(app(["openssl", "pkcs7", "-print_certs", "-quiet", + "-in", $p7file, + "-out", $out]))); +is(cmp_text($out, srctop_file('test', 'recipes', '25-test_pkcs7_data', 'grfc.out')), + 0, 'Comparing output');
\ No newline at end of file diff --git a/test/recipes/25-test_pkcs7_data/grfc.out b/test/recipes/25-test_pkcs7_data/grfc.out new file mode 100644 index 0000000000..21b7bf7820 --- /dev/null +++ b/test/recipes/25-test_pkcs7_data/grfc.out @@ -0,0 +1,31 @@ +-----BEGIN CERTIFICATE----- +MIIFGDCCBMegAwIBAgIQDIxAk7vmk71DC/UYJgMdBTAIBgYqhQMCAgMwggEWMRgw +FgYFKoUDZAESDTEwMjc3MzkzMzQ0NzkxGjAYBggqhQMDgQMBARIMMDA3NzA2MjI4 +MjE4MTowOAYDVQQJ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