diff options
author | Richard Levitte <levitte@openssl.org> | 2015-07-07 11:13:20 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2015-07-07 11:17:14 +0200 |
commit | f1cece554ddf282f1512b4da04664467746ffd24 (patch) | |
tree | 1a3dd22c2dc43c19c2ac420c45e942953f5644df /apps/req.c | |
parent | 5727582cf51e98e5e0faa435e7da2c8929533c0d (diff) |
Make "oneline" the default for nameopt
There's no reason why we should default to a output format that is
old, and confusing in some cases.
This affects the commands "ca", "crl", "req" and "x509".
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'apps/req.c')
-rw-r--r-- | apps/req.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/req.c b/apps/req.c index 03736cc34b..b3220ba6a4 100644 --- a/apps/req.c +++ b/apps/req.c @@ -211,6 +211,7 @@ int req_main(int argc, char **argv) int nodes = 0, kludge = 0, newhdr = 0, subject = 0, pubkey = 0; long newkey = -1; unsigned long chtype = MBSTRING_ASC, nmflag = 0, reqflag = 0; + char nmflag_set = 0; #ifndef OPENSSL_NO_DES cipher = EVP_des_ede3_cbc(); @@ -323,6 +324,7 @@ int req_main(int argc, char **argv) chtype = MBSTRING_UTF8; break; case OPT_NAMEOPT: + nmflag_set = 1; if (!set_name_ex(&nmflag, opt_arg())) goto opthelp; break; @@ -352,7 +354,7 @@ int req_main(int argc, char **argv) goto opthelp; break; case OPT_SUBJECT: - subject = 1; + subject = 1; break; case OPT_SUBJ: subj = opt_arg(); @@ -375,6 +377,10 @@ int req_main(int argc, char **argv) } argc = opt_num_rest(); argv = opt_rest(); + + if (!nmflag_set) + nmflag = XN_FLAG_ONELINE; + private = newreq && (pkey == NULL) ? 1 : 0; if (!app_passwd(passargin, passargout, &passin, &passout)) { |