Skip to content
This repository was archived by the owner on Aug 24, 2025. It is now read-only.

Commit a53d19c

Browse files
Previously this x509 command line was working, restore that
openssl x509 -in server.pem -signkey privkey.pem -out server.pem Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from openssl#5747)
1 parent 62d51ff commit a53d19c

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

apps/x509.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -450,10 +450,6 @@ int x509_main(int argc, char **argv)
450450
if (!nmflag_set)
451451
nmflag = XN_FLAG_ONELINE;
452452

453-
out = bio_open_default(outfile, 'w', outformat);
454-
if (out == NULL)
455-
goto end;
456-
457453
if (need_rand)
458454
app_RAND_load_file(NULL, 0);
459455

@@ -579,10 +575,12 @@ int x509_main(int argc, char **argv)
579575
goto end;
580576
}
581577

582-
if (!noout || text || next_serial) {
583-
OBJ_create("2.99999.3", "SET.ex3", "SET x509v3 extension 3");
578+
out = bio_open_default(outfile, 'w', outformat);
579+
if (out == NULL)
580+
goto end;
584581

585-
}
582+
if (!noout || text || next_serial)
583+
OBJ_create("2.99999.3", "SET.ex3", "SET x509v3 extension 3");
586584

587585
if (alias)
588586
X509_alias_set1(x, (unsigned char *)alias, -1);

0 commit comments

Comments
 (0)