From 65718c516ec69ff2314d12c7ce57b242ccc3021d Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Thu, 16 Jan 2020 13:40:52 -0500 Subject: [PATCH] Document most missing options Add cmd-nits make target. Listing options should stop when it hits the "parameters" separator. Add missing .pod.in files to doc/man1/build.info Tweak find-doc-nits to try openssl-XXX before XXX for POD files and change an error messavge to be more useful. Fix the following pages: ca, cms, crl, dgst, enc, engine, errstr, gendsa, genrsa, list, ocsp, passwd, pkcs7, pkcs12, rand, rehash, req, rsautil, s_server, speed, s_time, sess_id, smime, srp, ts, x509. Reviewed-by: Matt Caswell Reviewed-by: Dmitry Belyavskiy Reviewed-by: Matthias St. Pierre (Merged from https://github.com/openssl/openssl/pull/10873) --- Configurations/unix-Makefile.tmpl | 7 ++- apps/list.c | 4 +- apps/s_time.c | 1 + doc/man1/build.info | 74 +++++++++++++++---------------- doc/man1/openssl-ca.pod.in | 5 +++ doc/man1/openssl-cms.pod.in | 38 +++++++++++++++- doc/man1/openssl-crl.pod.in | 32 +++++++++++++ doc/man1/openssl-dgst.pod.in | 10 +++-- doc/man1/openssl-enc.pod.in | 7 ++- doc/man1/openssl-engine.pod | 5 +++ doc/man1/openssl-errstr.pod | 18 +++++--- doc/man1/openssl-gendsa.pod.in | 6 +++ doc/man1/openssl-genrsa.pod.in | 6 ++- doc/man1/openssl-list.pod | 10 +++++ doc/man1/openssl-ocsp.pod.in | 12 +++++ doc/man1/openssl-passwd.pod.in | 5 +++ doc/man1/openssl-pkcs12.pod.in | 23 +++++++++- doc/man1/openssl-pkcs7.pod.in | 11 +++-- doc/man1/openssl-rand.pod.in | 3 ++ doc/man1/openssl-rehash.pod | 7 +-- doc/man1/openssl-req.pod.in | 1 + doc/man1/openssl-rsautl.pod.in | 22 ++++++++- doc/man1/openssl-s_server.pod.in | 12 +++++ doc/man1/openssl-s_time.pod.in | 19 +++++++- doc/man1/openssl-sess_id.pod | 1 + doc/man1/openssl-smime.pod.in | 39 ++++++++++++---- doc/man1/openssl-speed.pod.in | 22 +++++++++ doc/man1/openssl-srp.pod.in | 3 ++ doc/man1/openssl-ts.pod.in | 11 +++++ doc/man1/openssl-x509.pod.in | 33 ++++++++++++++ util/find-doc-nits | 17 ++++--- 31 files changed, 385 insertions(+), 79 deletions(-) diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl index 62ca26dde5..14e6627d62 100644 --- a/Configurations/unix-Makefile.tmpl +++ b/Configurations/unix-Makefile.tmpl @@ -516,7 +516,7 @@ clean: libclean -$(RM) `find . -name '*{- platform->depext() -}' \! -name '.*' \! -type d -print` -$(RM) `find . -name '*{- platform->objext() -}' \! -name '.*' \! -type d -print` $(RM) core - $(RM) tags TAGS doc-nits + $(RM) tags TAGS doc-nits cmd-nits $(RM) -r test/test-runs $(RM) openssl.pc libcrypto.pc libssl.pc -$(RM) `find . -type l \! -name '.*' -print` @@ -950,10 +950,13 @@ update: generate errors ordinals generate: generate_apps generate_crypto_bn generate_crypto_objects \ generate_crypto_conf generate_crypto_asn1 generate_fuzz_oids -.PHONY: doc-nits +.PHONY: doc-nits cmd-nits doc-nits: build_generated (cd $(SRCDIR); $(PERL) util/find-doc-nits -n -l -e ) +cmd-nits: build_generated apps/openssl + (cd $(SRCDIR); $(PERL) util/find-doc-nits -c ) + # Test coverage is a good idea for the future #coverage: $(PROGRAMS) $(TESTPROGRAMS) # ... diff --git a/apps/list.c b/apps/list.c index a5382ac24f..ed6f1c71ac 100644 --- a/apps/list.c +++ b/apps/list.c @@ -364,10 +364,12 @@ static void list_options_for_command(const char *command) for ( ; o->name != NULL; o++) { char c = o->valtype; + if (o->name == OPT_PARAM_STR) + break; + if (o->name == OPT_HELP_STR || o->name == OPT_MORE_STR || o->name == OPT_SECTION_STR - || o->name == OPT_PARAM_STR || o->name[0] == '\0') continue; BIO_printf(bio_out, "%s %c\n", o->name, c == '\0' ? '-' : c); diff --git a/apps/s_time.c b/apps/s_time.c index d5816a1b16..babbdbe13e 100644 --- a/apps/s_time.c +++ b/apps/s_time.c @@ -89,6 +89,7 @@ const OPTIONS s_time_options[] = { {"cert", OPT_CERT, '<', "Cert file to use, PEM format assumed"}, {"key", OPT_KEY, '<', "File with key, PEM; default is -cert file"}, {"cafile", OPT_CAFILE, '<', "PEM format file of CA's"}, + {"CAfile", OPT_CAFILE, '<', "PEM format file of CA's"}, {"CApath", OPT_CAPATH, '/', "PEM format directory of CA's"}, {"CAstore", OPT_CASTORE, ':', "URI to store of CA's"}, {"no-CAfile", OPT_NOCAFILE, '-', diff --git a/doc/man1/build.info b/doc/man1/build.info index 10e1bbdb53..13012d4432 100644 --- a/doc/man1/build.info +++ b/doc/man1/build.info @@ -39,75 +39,75 @@ DEPEND[]= \ openssl-x509.pod DEPEND[openssl-ca.pod]=../perlvars.pm -GENERATE[openssl-ca.pod]=openssl-ca.pod.in DEPEND[openssl-cms.pod]=../perlvars.pm -GENERATE[openssl-cms.pod]=openssl-cms.pod.in DEPEND[openssl-crl.pod]=../perlvars.pm -GENERATE[openssl-crl.pod]=openssl-crl.pod.in DEPEND[openssl-dgst.pod]=../perlvars.pm -GENERATE[openssl-dgst.pod]=openssl-dgst.pod.in DEPEND[openssl-dhparam.pod]=../perlvars.pm -GENERATE[openssl-dhparam.pod]=openssl-dhparam.pod.in DEPEND[openssl-dsa.pod]=../perlvars.pm -GENERATE[openssl-dsa.pod]=openssl-dsa.pod.in DEPEND[openssl-dsaparam.pod]=../perlvars.pm -GENERATE[openssl-dsaparam.pod]=openssl-dsaparam.pod.in DEPEND[openssl-ec.pod]=../perlvars.pm -GENERATE[openssl-ec.pod]=openssl-ec.pod.in DEPEND[openssl-ecparam.pod]=../perlvars.pm -GENERATE[openssl-ecparam.pod]=openssl-ecparam.pod.in -DEPEND[openssl-ec.pod]=../perlvars.pm DEPEND[openssl-enc.pod]=../perlvars.pm -GENERATE[openssl-enc.pod]=openssl-enc.pod.in DEPEND[openssl-gendsa.pod]=../perlvars.pm -GENERATE[openssl-gendsa.pod]=openssl-gendsa.pod.in DEPEND[openssl-genpkey.pod]=../perlvars.pm -GENERATE[openssl-genpkey.pod]=openssl-genpkey.pod.in DEPEND[openssl-genrsa.pod]=../perlvars.pm -GENERATE[openssl-genrsa.pod]=openssl-genrsa.pod.in DEPEND[openssl-ocsp.pod]=../perlvars.pm -GENERATE[openssl-ocsp.pod]=openssl-ocsp.pod.in DEPEND[openssl-passwd.pod]=../perlvars.pm -GENERATE[openssl-passwd.pod]=openssl-passwd.pod.in +DEPEND[openssl-pkcs12.pod]=../perlvars.pm DEPEND[openssl-pkcs7.pod]=../perlvars.pm -GENERATE[openssl-pkcs7.pod]=openssl-pkcs7.pod.in DEPEND[openssl-pkcs8.pod]=../perlvars.pm -GENERATE[openssl-pkcs8.pod]=openssl-pkcs8.pod.in -DEPEND[openssl-pkcs12.pod]=../perlvars.pm -GENERATE[openssl-pkcs12.pod]=openssl-pkcs12.pod.in DEPEND[openssl-pkey.pod]=../perlvars.pm -GENERATE[openssl-pkey.pod]=openssl-pkey.pod.in DEPEND[openssl-pkeyparam.pod]=../perlvars.pm -GENERATE[openssl-pkeyparam.pod]=openssl-pkeyparam.pod.in DEPEND[openssl-pkeyutl.pod]=../perlvars.pm -GENERATE[openssl-pkeyutl.pod]=openssl-pkeyutl.pod.in DEPEND[openssl-rand.pod]=../perlvars.pm -GENERATE[openssl-rand.pod]=openssl-rand.pod.in DEPEND[openssl-req.pod]=../perlvars.pm -GENERATE[openssl-req.pod]=openssl-req.pod.in DEPEND[openssl-rsa.pod]=../perlvars.pm -GENERATE[openssl-rsa.pod]=openssl-rsa.pod.in DEPEND[openssl-rsautl.pod]=../perlvars.pm -GENERATE[openssl-rsautl.pod]=openssl-rsautl.pod.in DEPEND[openssl-s_client.pod]=../perlvars.pm -GENERATE[openssl-s_client.pod]=openssl-s_client.pod.in DEPEND[openssl-s_server.pod]=../perlvars.pm -GENERATE[openssl-s_server.pod]=openssl-s_server.pod.in DEPEND[openssl-s_time.pod]=../perlvars.pm -GENERATE[openssl-s_time.pod]=openssl-s_time.pod.in DEPEND[openssl-smime.pod]=../perlvars.pm -GENERATE[openssl-smime.pod]=openssl-smime.pod.in DEPEND[openssl-speed.pod]=../perlvars.pm -GENERATE[openssl-speed.pod]=openssl-speed.pod.in DEPEND[openssl-spkac.pod]=../perlvars.pm -GENERATE[openssl-spkac.pod]=openssl-spkac.pod.in DEPEND[openssl-srp.pod]=../perlvars.pm -GENERATE[openssl-srp.pod]=openssl-srp.pod.in DEPEND[openssl-storeutl.pod]=../perlvars.pm -GENERATE[openssl-storeutl.pod]=openssl-storeutl.pod.in DEPEND[openssl-ts.pod]=../perlvars.pm -GENERATE[openssl-ts.pod]=openssl-ts.pod.in DEPEND[openssl-verify.pod]=../perlvars.pm -GENERATE[openssl-verify.pod]=openssl-verify.pod.in DEPEND[openssl-x509.pod]=../perlvars.pm + +GENERATE[openssl-ca.pod]=openssl-ca.pod.in +GENERATE[openssl-cms.pod]=openssl-cms.pod.in +GENERATE[openssl-crl.pod]=openssl-crl.pod.in +GENERATE[openssl-dgst.pod]=openssl-dgst.pod.in +GENERATE[openssl-dhparam.pod]=openssl-dhparam.pod.in +GENERATE[openssl-dsa.pod]=openssl-dsa.pod.in +GENERATE[openssl-dsaparam.pod]=openssl-dsaparam.pod.in +GENERATE[openssl-ec.pod]=openssl-ec.pod.in +GENERATE[openssl-ecparam.pod]=openssl-ecparam.pod.in +GENERATE[openssl-enc.pod]=openssl-enc.pod.in +GENERATE[openssl-gendsa.pod]=openssl-gendsa.pod.in +GENERATE[openssl-genpkey.pod]=openssl-genpkey.pod.in +GENERATE[openssl-genrsa.pod]=openssl-genrsa.pod.in +GENERATE[openssl-ocsp.pod]=openssl-ocsp.pod.in +GENERATE[openssl-passwd.pod]=openssl-passwd.pod.in +GENERATE[openssl-pkcs12.pod]=openssl-pkcs12.pod.in +GENERATE[openssl-pkcs7.pod]=openssl-pkcs7.pod.in +GENERATE[openssl-pkcs8.pod]=openssl-pkcs8.pod.in +GENERATE[openssl-pkey.pod]=openssl-pkey.pod.in +GENERATE[openssl-pkeyparam.pod]=openssl-pkeyparam.pod.in +GENERATE[openssl-pkeyutl.pod]=openssl-pkeyutl.pod.in +GENERATE[openssl-rand.pod]=openssl-rand.pod.in +GENERATE[openssl-req.pod]=openssl-req.pod.in +GENERATE[openssl-rsa.pod]=openssl-rsa.pod.in +GENERATE[openssl-rsautl.pod]=openssl-rsautl.pod.in +GENERATE[openssl-s_client.pod]=openssl-s_client.pod.in +GENERATE[openssl-s_server.pod]=openssl-s_server.pod.in +GENERATE[openssl-s_time.pod]=openssl-s_time.pod.in +GENERATE[openssl-smime.pod]=openssl-smime.pod.in +GENERATE[openssl-speed.pod]=openssl-speed.pod.in +GENERATE[openssl-spkac.pod]=openssl-spkac.pod.in +GENERATE[openssl-srp.pod]=openssl-srp.pod.in +GENERATE[openssl-storeutl.pod]=openssl-storeutl.pod.in +GENERATE[openssl-ts.pod]=openssl-ts.pod.in +GENERATE[openssl-verify.pod]=openssl-verify.pod.in GENERATE[openssl-x509.pod]=openssl-x509.pod.in diff --git a/doc/man1/openssl-ca.pod.in b/doc/man1/openssl-ca.pod.in index 6d351ae1cc..720db228cb 100644 --- a/doc/man1/openssl-ca.pod.in +++ b/doc/man1/openssl-ca.pod.in @@ -23,6 +23,7 @@ B B [B<-crl_CA_compromise> I