Multiple -trusted/-untrusted/-CRLfile options in verify

It is sometimes useful (especially in automated tests) to supply
multiple trusted or untrusted certificates via separate files rather
than have to prepare a single file containing them all.

To that end, change verify(1) to accept these options zero or more
times.  Also automatically set -no-CAfile and -no-CApath when
-trusted is specified.

Improve verify(1) documentation, which could still use some work.

Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
Viktor Dukhovni
2016-01-16 01:15:02 -05:00
parent 0996dc5440
commit feb2f53edc
3 changed files with 88 additions and 62 deletions

View File

@@ -8,10 +8,6 @@ use OpenSSL::Test qw/:DEFAULT top_dir top_file/;
setup("test_verify");
# Note for now, at most one trusted and one untrusted PEM file can be
# specified. The verify(1) option parser does not accumulate content
# from multiple trusted or untrusted files.
#
sub verify {
my ($cert, $vname, $trusted, $untrusted, @opts) = @_;
my @args = qw(openssl verify -verify_name);