summaryrefslogtreecommitdiffstats
path: root/apps/req.c
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2021-02-26 12:48:43 +0100
committerDr. David von Oheimb <dev@ddvo.net>2021-02-28 11:46:34 +0100
commit46a11faf3b86ddd2fcc687a0fcfd982e6d201626 (patch)
tree21facc2afa232ad3641b6f00b3f2be138a75bdfe /apps/req.c
parent859e5f16213b1b80d06a20872ac137bdea708c29 (diff)
apps/x509.c: Improve print_name() and coding style of large print loop in x509_main()
Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14340)
Diffstat (limited to 'apps/req.c')
-rw-r--r--apps/req.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/apps/req.c b/apps/req.c
index 881cbb45c7..4056b18f51 100644
--- a/apps/req.c
+++ b/apps/req.c
@@ -921,9 +921,8 @@ int req_main(int argc, char **argv)
if (subj != NULL && !newreq && !gen_x509) {
if (verbose) {
- BIO_printf(bio_err, "Modifying subject of certificate request\n");
- print_name(bio_err, "Old subject=",
- X509_REQ_get_subject_name(req), get_nameopt());
+ BIO_printf(out, "Modifying subject of certificate request\n");
+ print_name(out, "Old subject=", X509_REQ_get_subject_name(req));
}
if (!X509_REQ_set_subject_name(req, fsubj)) {
@@ -932,8 +931,7 @@ int req_main(int argc, char **argv)
}
if (verbose) {
- print_name(bio_err, "New subject=",
- X509_REQ_get_subject_name(req), get_nameopt());
+ print_name(out, "New subject=", X509_REQ_get_subject_name(req));
}
}
@@ -996,12 +994,9 @@ int req_main(int argc, char **argv)
}
if (subject) {
- if (gen_x509)
- print_name(out, "subject=", X509_get_subject_name(new_x509),
- get_nameopt());
- else
- print_name(out, "subject=", X509_REQ_get_subject_name(req),
- get_nameopt());
+ print_name(out, "subject=", gen_x509
+ ? X509_get_subject_name(new_x509)
+ : X509_REQ_get_subject_name(req));
}
if (modulus) {