Skip to content

Commit

Permalink
Added test cases for pkcs12 bad certificates
Browse files Browse the repository at this point in the history
  • Loading branch information
lejcik committed Mar 10, 2024
1 parent b5b13ea commit b6803be
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion test/recipes/80-test_pkcs12.t
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ if (eval { require Win32::API; 1; }) {
}
$ENV{OPENSSL_WIN32_UTF8}=1;

plan tests => 28;
plan tests => 31;

# Test different PKCS#12 formats
ok(run(test(["pkcs12_format_test"])), "test pkcs12 formats");
Expand Down Expand Up @@ -184,11 +184,23 @@ with({ exit_checker => sub { return shift == 1; } },
"-nomacver"])),
"test bad pkcs12 file 1 (nomacver)");

ok(run(app(["openssl", "pkcs12", "-in", $bad1, "-password", "pass:",
"-info"])),
"test bad pkcs12 file 1 (info)");

ok(run(app(["openssl", "pkcs12", "-in", $bad2, "-password", "pass:"])),
"test bad pkcs12 file 2");

ok(run(app(["openssl", "pkcs12", "-in", $bad2, "-password", "pass:",
"-info"])),
"test bad pkcs12 file 2 (info)");

ok(run(app(["openssl", "pkcs12", "-in", $bad3, "-password", "pass:"])),
"test bad pkcs12 file 3");

ok(run(app(["openssl", "pkcs12", "-in", $bad3, "-password", "pass:",
"-info"])),
"test bad pkcs12 file 3 (info)");
});

# Test with Oracle Trusted Key Usage specified in openssl.cnf
Expand Down

0 comments on commit b6803be

Please sign in to comment.