diff options
author | Richard Levitte <levitte@openssl.org> | 2017-02-11 04:02:32 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2018-02-23 07:40:42 +0100 |
commit | 7622baf8a7c3e9084f97a4f41406a29ef5d04fc3 (patch) | |
tree | d49d4707675a5f1e82be42a1621502906cca80ab /test | |
parent | ce9586b98c792288a57620035b7f5824563389ce (diff) |
Test the storeutl expectation options
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2688)
Diffstat (limited to 'test')
-rw-r--r-- | test/recipes/90-test_store.t | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/test/recipes/90-test_store.t b/test/recipes/90-test_store.t index 83ec012cac..94f2c1aca6 100644 --- a/test/recipes/90-test_store.t +++ b/test/recipes/90-test_store.t @@ -1,5 +1,5 @@ #! /usr/bin/env perl -# Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved. +# Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. # # Licensed under the OpenSSL license (the "License"). You may not use # this file except in compliance with the License. You can obtain a copy @@ -69,12 +69,12 @@ my @noexist_file_files = ( "file:blahdiblah.pem", "file:test/blahdibleh.der" ); - my $n = (3 * scalar @noexist_files) + (6 * scalar @src_files) + (4 * scalar @generated_files) + (scalar keys %generated_file_files) + (scalar @noexist_file_files) + + 3 + 4; plan tests => $n; @@ -152,6 +152,20 @@ indir "store_$$" => sub { ok(run(app(["openssl", "storeutl", to_abs_file_uri($dir, 1)]))); } } + + ok(run(app(['openssl', 'storeutl', '-certs', + srctop_file('test', 'testx509.pem')])), + "Checking that -certs returns 1 object on a certificate file"); + ok(run(app(['openssl', 'storeutl', '-certs', + srctop_file('test', 'testcrl.pem')])), + "Checking that -certs returns 0 objects on a CRL file"); + + ok(run(app(['openssl', 'storeutl', '-crls', + srctop_file('test', 'testx509.pem')])), + "Checking that -crls returns 0 objects on a certificate file"); + ok(run(app(['openssl', 'storeutl', '-crls', + srctop_file('test', 'testcrl.pem')])), + "Checking that -crls returns 1 object on a CRL file"); } }, create => 1, cleanup => 1; |