提交 2d1b5717 编写于 作者: B Bernd Edlinger

Previously this x509 command line was working, restore that

openssl x509 -in server.pem -signkey privkey.pem -out server.pem
Reviewed-by: NRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5746)
上级 52814352
...@@ -467,10 +467,6 @@ int x509_main(int argc, char **argv) ...@@ -467,10 +467,6 @@ int x509_main(int argc, char **argv)
goto opthelp; goto opthelp;
} }
out = bio_open_default(outfile, 'w', outformat);
if (out == NULL)
goto end;
if (!app_passwd(passinarg, NULL, &passin, NULL)) { if (!app_passwd(passinarg, NULL, &passin, NULL)) {
BIO_printf(bio_err, "Error getting password\n"); BIO_printf(bio_err, "Error getting password\n");
goto end; goto end;
...@@ -596,10 +592,12 @@ int x509_main(int argc, char **argv) ...@@ -596,10 +592,12 @@ int x509_main(int argc, char **argv)
goto end; goto end;
} }
if (!noout || text || next_serial) { out = bio_open_default(outfile, 'w', outformat);
OBJ_create("2.99999.3", "SET.ex3", "SET x509v3 extension 3"); if (out == NULL)
goto end;
} if (!noout || text || next_serial)
OBJ_create("2.99999.3", "SET.ex3", "SET x509v3 extension 3");
if (alias) if (alias)
X509_alias_set1(x, (unsigned char *)alias, -1); X509_alias_set1(x, (unsigned char *)alias, -1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册