Skip to content

Commit 749f099

Browse files
fixup! Fix empty AKID/SKID handling
1 parent 5ca8014 commit 749f099

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

test/recipes/25-test_x509.t

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use File::Compare qw/compare_text/;
1717

1818
setup("test_x509");
1919

20-
plan tests => 140;
20+
plan tests => 142;
2121

2222
# Prevent MSys2 filename munging for arguments that look like file paths but
2323
# aren't
@@ -630,3 +630,14 @@ SKIP: {
630630

631631
ok(run(test(["x509_test", $psscert])), "running x509_test");
632632
}
633+
634+
my $cert = "cert.pem";
635+
my $SKID_AKID = "subjectKeyIdentifier,authorityKeyIdentifier";
636+
my $no_SKID_cnf = "no_SKID.cnf";
637+
open(my $fh, '>', $no_SKID_cnf) or die "Could not open file $no_SKID_cnf";
638+
print $fh "subjectKeyIdentifier = none";
639+
close $fh;
640+
ok(run(app(["openssl", "x509", "-new", "-subj", "/",
641+
"-extfile", $no_SKID_cnf, "-key", srctop_file(@certs, "ee-key.pem"),
642+
"-out", $cert])));
643+
cert_ext_has_n_different_lines($cert, 0, $SKID_AKID); # no SKID and no AKID

0 commit comments

Comments
 (0)