New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
apps/openssl: error messages for unknown command line options are inconsistent #10773
Comments
A more systematic check using the two scripts ./unknown-args #!/bin/bash
for cmd in asn1parse ca ciphers cms crl crl2pkcs7 dgst dhparam dsa dsaparam ec ecparam enc engine errstr fipsinstall gendsa genpkey genrsa info kdf list mac nseq ocsp passwd pkcs12 pkcs7 pkcs8 pkey pkeyparam pkeyutl prime provider rand rehash req rsa rsautl s_client s_server s_time sess_id smime speed spkac srp storeutl ts verify version x509 ; do
util/shlib_wrap.sh apps/openssl $cmd -foobar
done respectively ./unknown-args-unique #!/bin/bash
(
for cmd in asn1parse ca ciphers cms crl crl2pkcs7 dgst dhparam dsa dsaparam ec ecparam enc engine errstr fipsinstall gendsa genpkey genrsa info kdf list mac nseq ocsp passwd pkcs12 pkcs7 pkcs8 pkey pkeyparam pkeyutl prime provider rand rehash req rsa rsautl s_client s_server s_time sess_id smime speed spkac srp storeutl ts verify version x509 ; do
util/shlib_wrap.sh apps/openssl $cmd -foobar |& sed "s/\<$cmd\>/cmd/g"
done
) | sort | uniq yields that essentially
|
This might be more flexible: |
Thanks for the hint, looks much nicer now: ./unknown-args #!/bin/bash
openssl="util/shlib_wrap.sh apps/openssl"
for cmd in $($openssl list -commands); do
$openssl $cmd -foobar
done ./unknown-args-unique #!/bin/bash
openssl="util/shlib_wrap.sh apps/openssl"
(
for cmd in $($openssl list -commands); do
$openssl $cmd -foobar |& sed "s/\<$cmd\>/cmd/g"
done
) | sort | uniq |
Adding "-c" to the unique shows 35 "unknown option" and 17 "unrecognized flag" |
I prefer "option", too. But note that the current formulation is not grammatically correct:
My suggestion:
|
I figured it out! It's from the places that try to parse an option as a cipher or digest name! Look at the |
Cool! I'll wait for your pr ;-) |
Done: #10774 :) |
The error messages for unknown command line options are very inconsistent. Here is an incomplete list of examples, taken from #10132 (comment):
The text was updated successfully, but these errors were encountered: