From: David von Oheimb Date: Thu, 14 Dec 2017 13:02:27 +0000 (+0100) Subject: apps/pkcs12: Retain test output files X-Git-Tag: openssl-3.0.0-alpha9~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=279b61d0cade44964956c5c39da462fe43414cc1;p=thirdparty%2Fopenssl.git apps/pkcs12: Retain test output files Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/4930) --- diff --git a/test/recipes/80-test_pkcs12.t b/test/recipes/80-test_pkcs12.t index 07cd91f1965..0f977d7755f 100644 --- a/test/recipes/80-test_pkcs12.t +++ b/test/recipes/80-test_pkcs12.t @@ -66,17 +66,19 @@ ok(run(test(["pkcs12_format_test"])), "test pkcs12 formats"); ok(run(app(["openssl", "pkcs12", "-noout", "-password", "pass:$pass", "-in", srctop_file("test", "shibboleth.pfx")])), - "test_pkcs12"); + "test_load_cert_pkcs12"); my @path = qw(test certs); -my $tmpfile = "tmp.p12"; +my $outfile1 = "out1.p12"; +my $outfile2 = "out2.p12"; +my $outfile3 = "out3.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])), + "-nokeys", "-passout", "pass:", "-out", $outfile1])), "test_pkcs12_chain_untrusted"); # Test the -passcerts option @@ -85,9 +87,8 @@ ok(run(app(["openssl", "pkcs12", "-export", "-certfile", srctop_file(@path, "v3-certs-TDES.p12"), "-passcerts", "pass:v3-certs", "-nokeys", "-passout", "pass:v3-certs", "-descert", - "-out", $tmpfile])), - "test_pkcs12_passcert"); -unlink $tmpfile; + "-out", $outfile2])), + "test_pkcs12_passcerts"); # Test reading legacy PKCS#12 file ok(run(app(["openssl", "pkcs12", "-export", @@ -95,8 +96,7 @@ ok(run(app(["openssl", "pkcs12", "-export", "-passin", "pass:v3-certs", "-provider", "default", "-provider", "legacy", "-nokeys", "-passout", "pass:v3-certs", "-descert", - "-out", $tmpfile])), - "test_pkcs12_passcert"); -unlink $tmpfile; + "-out", $outfile3])), + "test_pkcs12_passcerts_legacy"); SetConsoleOutputCP($savedcp) if (defined($savedcp));