openssl/apps
Jacob Hoffman-Andrews fd6a0f5e52 Clarify error for unrecognized arguments.
Many of the sub-commands under apps/ accept cipher or digest arguments like
"-sha256". These are implemented using a catchall flag that runs the result
through opt_md() or opt_cipher(). That means any unrecognized flag, including
typos, gets sent to those two functions, producing confusing error messages like
below:

    $ ./apps/openssl req -x590
    req: Unrecognized digest x590
    req: Use -help for summary.

This change switches these two functions to say "Unrecognized flag X" instead.
The new message deliberately leaves off the "-" from the flag name, because
there are some cases where opt_md() and opt_cipher() are passed a flag value
instead (for instance, openssl ca -md). I think the new message is generic
enough that it can serve both cases with improved clarity.

CLA: trivial

Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4972)
2018-01-08 12:57:22 -05:00
..
demoSRP Missing SRP files. 2011-03-16 11:50:33 +00:00
app_rand.c Fix use-after-free 2017-07-17 07:46:49 -04:00
apps.c Add 'openssl req' option to specify extension values on command line 2017-12-28 16:07:58 +01:00
apps.h Add 'openssl req' option to specify extension values on command line 2017-12-28 16:07:58 +01:00
asn1pars.c Remove parentheses of return. 2017-10-18 16:05:06 +01:00
build.info Add a simple store utility command 2017-06-29 11:55:31 +02:00
ca-cert.srl
ca-key.pem Fix verify(1) to report failure when verification fails 2016-01-13 17:55:17 -05:00
ca-req.pem Fix verify(1) to report failure when verification fails 2016-01-13 17:55:17 -05:00
ca.c Useless conf != NULL test 2017-12-09 23:59:56 +01:00
CA.pl.in Adjusted Argument Indices 2017-12-03 14:01:39 +01:00
cert.pem
ciphers.c Consistent formatting for sizeof(foo) 2017-12-07 19:11:49 -05:00
client.pem Replace expired test server and client certificates with new ones. 2011-12-08 14:44:05 +00:00
cms.c Corrected 'cms' exit status when key or certificate cannot be opened 2018-01-06 15:37:05 +01:00
crl.c Remove parentheses of return. 2017-10-18 16:05:06 +01:00
crl2p7.c Remove parentheses of return. 2017-10-18 16:05:06 +01:00
ct_log_list.cnf GH1536: Install empty CT log list 2016-09-14 18:22:33 -04:00
dgst.c Remove parentheses of return. 2017-10-18 16:05:06 +01:00
dh1024.pem Update Diffie-Hellman parameters to IANA standards 2016-05-03 10:32:01 -04:00
dh2048.pem Update Diffie-Hellman parameters to IANA standards 2016-05-03 10:32:01 -04:00
dh4096.pem Update Diffie-Hellman parameters to IANA standards 2016-05-03 10:32:01 -04:00
dhparam.c Consistent formatting for sizeof(foo) 2017-12-07 19:11:49 -05:00
dsa-ca.pem Fix verify(1) to report failure when verification fails 2016-01-13 17:55:17 -05:00
dsa-pca.pem Fix verify(1) to report failure when verification fails 2016-01-13 17:55:17 -05:00
dsa.c Add error handling in dsa_main and ASN1_i2d_bio. 2017-11-03 15:46:51 +01:00
dsa512.pem
dsa1024.pem
dsap.pem
dsaparam.c Consistent formatting for sizeof(foo) 2017-12-07 19:11:49 -05:00
ec.c Remove parentheses of return. 2017-10-18 16:05:06 +01:00
ecparam.c Consistent formatting for sizeof(foo) 2017-12-07 19:11:49 -05:00
enc.c Consistent formatting for sizeof(foo) 2017-12-07 19:11:49 -05:00
engine.c Remove parentheses of return. 2017-10-18 16:05:06 +01:00
errstr.c Consistent formatting for sizeof(foo) 2017-12-07 19:11:49 -05:00
gendsa.c Remove parentheses of return. 2017-10-18 16:05:06 +01:00
genpkey.c Clean up a bundle of codingstyle stuff in apps directory 2017-06-12 16:11:05 -04:00
genrsa.c Support multi-prime RSA (RFC 8017) 2017-11-21 14:38:42 +08:00
nseq.c Remove parentheses of return. 2017-10-18 16:05:06 +01:00
ocsp.c Remove remaining NETWARE ifdef's 2018-01-07 09:51:54 -05:00
openssl-vms.cnf Added support for ESSCertIDv2 2017-05-03 09:04:23 +02:00
openssl.c Add the possibility to do 'openssl help [command]' 2018-01-06 19:27:57 +01:00
openssl.cnf Added support for ESSCertIDv2 2017-05-03 09:04:23 +02:00
opt.c Clarify error for unrecognized arguments. 2018-01-08 12:57:22 -05:00
passwd.c Consistent formatting for sizeof(foo) 2017-12-07 19:11:49 -05:00
pca-cert.srl
pca-key.pem Fix verify(1) to report failure when verification fails 2016-01-13 17:55:17 -05:00
pca-req.pem Fix verify(1) to report failure when verification fails 2016-01-13 17:55:17 -05:00
pkcs7.c Remove parentheses of return. 2017-10-18 16:05:06 +01:00
pkcs8.c Consistent formatting for sizeof(foo) 2017-12-07 19:11:49 -05:00
pkcs12.c Consistent formatting for sizeof(foo) 2017-12-07 19:11:49 -05:00
pkey.c Support public key and param check in EVP interface 2017-11-20 07:20:30 +01:00
pkeyparam.c Support public key and param check in EVP interface 2017-11-20 07:20:30 +01:00
pkeyutl.c Allow use of long name for KDFs 2017-08-03 02:18:44 +01:00
prime.c Check # of arguments for remaining commands. 2017-08-21 10:58:49 -04:00
privkey.pem PR: 1644 2009-09-06 15:49:46 +00:00
progs.pl Add SM3/SM4 to openssl command-line tool 2017-11-22 15:23:48 +08:00
rand.c Consistent formatting for sizeof(foo) 2017-12-07 19:11:49 -05:00
rehash.c Since return is inconsistent, I removed unnecessary parentheses and 2017-10-09 13:17:09 +01:00
req.c Add 'openssl req' option to specify extension values on command line 2017-12-28 16:07:58 +01:00
req.pem
rsa.c Fix typo in comment 2017-12-11 09:22:39 -06:00
rsa8192.pem
rsautl.c Standardize apps use of -rand, etc. 2017-07-16 19:20:45 -04:00
s512-key.pem
s512-req.pem
s1024key.pem
s1024req.pem
s_apps.h Clean up a bundle of codingstyle stuff in apps directory 2017-06-12 16:11:05 -04:00
s_cb.c Merge HRR into ServerHello 2017-12-14 15:06:37 +00:00
s_client.c Ignore the session when setting SNI in s_client 2017-11-21 17:46:22 +00:00
s_server.c Consistent formatting for sizeof(foo) 2017-12-07 19:11:49 -05:00
s_socket.c Allow an endpoint to read the alert data before closing the socket 2017-09-08 13:10:57 +01:00
s_time.c (Re)move some things from e_os.h 2017-08-22 14:15:40 -04:00
server.pem Replace expired test server and client certificates with new ones. 2011-12-08 14:44:05 +00:00
server.srl
server2.pem Replace expired test server and client certificates with new ones. 2011-12-08 14:44:05 +00:00
sess_id.c Remove parentheses of return. 2017-10-18 16:05:06 +01:00
smime.c Remove parentheses of return. 2017-10-18 16:05:06 +01:00
speed.c apps/speed.c: initialize buffers 2017-12-09 21:44:00 +01:00
spkac.c Remove parentheses of return. 2017-10-18 16:05:06 +01:00
srp.c Remove parentheses of return. 2017-10-18 16:05:06 +01:00
storeutl.c Add a recursive option to 'openssl storeutl' 2017-09-12 11:38:16 +02:00
testCA.pem
testdsa.h Clean up a bundle of codingstyle stuff in apps directory 2017-06-12 16:11:05 -04:00
testrsa.h Copyright consolidation 01/10 2016-05-17 14:19:19 -04:00
timeouts.h Copyright consolidation 01/10 2016-05-17 14:19:19 -04:00
ts.c Remove parentheses of return. 2017-10-18 16:05:06 +01:00
tsget.in Cleanup some copyright stuff 2017-06-30 21:56:44 -04:00
verify.c Remove parentheses of return. 2017-10-18 16:05:06 +01:00
version.c Remove parentheses of return. 2017-10-18 16:05:06 +01:00
vms_decc_init.c Copyright consolidation 01/10 2016-05-17 14:19:19 -04:00
vms_term_sock.c Consistent formatting for sizeof(foo) 2017-12-07 19:11:49 -05:00
vms_term_sock.h Cleanup some copyright stuff 2017-06-30 21:56:44 -04:00
win32_init.c Fix not-c code 2016-10-19 00:56:48 +02:00
x509.c Fix small but important regression 2017-11-02 10:47:51 +00:00