diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-08-10 14:23:46 +0200 |
---|---|---|
committer | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-08-27 20:08:44 +0200 |
commit | 1d6c86709c72442aff3bdde8ab48b048e6df153a (patch) | |
tree | 987d40e9e25bda1b5a245297e50585d20e896697 /test | |
parent | 77a9bb83d7d785acddef83ac8d627719f74760cd (diff) | |
download | openssl-1d6c86709c72442aff3bdde8ab48b048e6df153a.zip openssl-1d6c86709c72442aff3bdde8ab48b048e6df153a.tar.gz openssl-1d6c86709c72442aff3bdde8ab48b048e6df153a.tar.bz2 |
apps/pkcs12.c: Add -untrusted option
Also improve EE cert selection, user guidance, and documentation.
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/12643)
Diffstat (limited to 'test')
-rw-r--r-- | test/recipes/80-test_pkcs12.t | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/recipes/80-test_pkcs12.t b/test/recipes/80-test_pkcs12.t index 24247b8..e474d44 100644 --- a/test/recipes/80-test_pkcs12.t +++ b/test/recipes/80-test_pkcs12.t @@ -57,7 +57,7 @@ if (eval { require Win32::API; 1; }) { } $ENV{OPENSSL_WIN32_UTF8}=1; -plan tests => 4; +plan tests => 5; # Test different PKCS#12 formats ok(run(test(["pkcs12_format_test"])), "test pkcs12 formats"); @@ -71,6 +71,14 @@ ok(run(app(["openssl", "pkcs12", "-noout", my @path = qw(test certs); my $tmpfile = "tmp.p12"; +# Test the -chain option with -untrusted +ok(run(app(["openssl", "pkcs12", "-export", "-chain", + "-CAfile", srctop_file(@path, "sroot-cert.pem"), + "-untrusted", srctop_file(@path, "ca-cert.pem"), + "-in", srctop_file(@path, "ee-cert.pem"), + "-nokeys", "-passout", "pass:", "-out", $tmpfile])), + "test_pkcs12_chain_untrusted"); + # Test the -passcerts option ok(run(app(["openssl", "pkcs12", "-export", "-in", srctop_file(@path, "ee-cert.pem"), |