Fix various doc nits.
authorRich Salz <rsalz@openssl.org>
Mon, 12 Dec 2016 16:14:40 +0000 (11:14 -0500)
committerRich Salz <rsalz@openssl.org>
Tue, 13 Dec 2016 17:12:35 +0000 (12:12 -0500)
find-doc-nits warns if you don't give a "what to do flag"
Don't use regexps for section names, just strings:  More consistency.
Rename "COMMAND OPTIONS" to OPTIONS.
Fix a couple of other nit-level things.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2076)

29 files changed:
doc/man1/CA.pl.pod
doc/man1/ca.pod
doc/man1/ciphers.pod
doc/man1/cms.pod
doc/man1/crl.pod
doc/man1/crl2pkcs7.pod
doc/man1/dsa.pod
doc/man1/ec.pod
doc/man1/errstr.pod
doc/man1/nseq.pod
doc/man1/ocsp.pod
doc/man1/openssl.pod
doc/man1/pkcs12.pod
doc/man1/pkcs7.pod
doc/man1/pkcs8.pod
doc/man1/pkey.pod
doc/man1/pkeyparam.pod
doc/man1/pkeyutl.pod
doc/man1/req.pod
doc/man1/rsa.pod
doc/man1/rsautl.pod
doc/man1/sess_id.pod
doc/man1/smime.pod
doc/man1/spkac.pod
doc/man1/verify.pod
doc/man3/ERR_GET_LIB.pod
doc/man3/EVP_EncryptInit.pod
doc/man3/SSL_set_bio.pod
util/find-doc-nits.pl

index 9d760c9a4539908bc0f342bfc3fef362a78af168..727cce12c7a17383d9938ae4f0951dea664111b4 100644 (file)
@@ -29,28 +29,14 @@ B<CA.pl> B<-verify> [B<-extra-verify> extra-params] B<certfile>...
 
 B<CA.pl> B<-revoke> [B<-extra-ca> extra-params] B<certfile> [B<reason>]
 
+=head1 DESCRIPTION
+
 The B<CA.pl> script is a perl script that supplies the relevant command line
 arguments to the B<openssl> command for some common certificate operations.
 It is intended to simplify the process of certificate creation and management
 by the use of some simple options.
 
-=head1 COMMON OPTIONS
-
-=over 4
-
-=item B<-extra-req> | B<-extra-ca> | B<-extra-pkcs12> | B<-extra-x509> | B<-extra-verify> <extra-params>
-
-The purpose of these parameters is to allow optional parameters to be supplied
-to B<openssl> that this command executes. The B<-extra-cmd> are specific to the
-option being used and the B<openssl> command getting invoked. For example
-when this command invokes B<openssl req> extra parameters can be passed on
-with the B<-extra-req> parameter. The
-B<openssl> commands being invoked per option are documented below.
-Users should consult B<openssl> command documentation for more information.
-
-=back
-
-=head1 COMMAND OPTIONS
+=head1 OPTIONS
 
 =over 4
 
@@ -134,6 +120,16 @@ verifies certificates against the CA certificate for "demoCA". If no certificate
 are specified on the command line it tries to verify the file "newcert.pem".
 Invokes B<openssl verify> command.
 
+=item B<-extra-req> | B<-extra-ca> | B<-extra-pkcs12> | B<-extra-x509> | B<-extra-verify> <extra-params>
+
+The purpose of these parameters is to allow optional parameters to be supplied
+to B<openssl> that this command executes. The B<-extra-cmd> are specific to the
+option being used and the B<openssl> command getting invoked. For example
+when this command invokes B<openssl req> extra parameters can be passed on
+with the B<-extra-req> parameter. The
+B<openssl> commands being invoked per option are documented below.
+Users should consult B<openssl> command documentation for more information.
+
 =back
 
 =head1 EXAMPLES
index 3be69795886fd4478ba50609e4929b4220b6de30..5d4cfda12549ae99c55f10fc4f40a5baf16e7a26 100644 (file)
@@ -62,7 +62,7 @@ and their status.
 
 The options descriptions will be divided into each purpose.
 
-=head1 COMMAND OPTIONS
+=head1 OPTIONS
 
 =over 4
 
index 007aa85c8286ce18de1162d5399070b8a3e50ac8..c1d1cb25a073f4b0942cdd0c82e5e088d59b8584 100644 (file)
@@ -28,7 +28,7 @@ The B<ciphers> command converts textual OpenSSL cipher lists into ordered
 SSL cipher preference lists. It can be used as a test tool to determine
 the appropriate cipherlist.
 
-=head1 COMMAND OPTIONS
+=head1 OPTIONS
 
 =over 4
 
index d5529bea6bc91ea8fdcc100600be57acc6b8af66..b97120a0e4c42f63e14fcf6760433ab31ea6fab5 100644 (file)
@@ -104,7 +104,7 @@ B<openssl> B<cms>
 The B<cms> command handles S/MIME v3.1 mail. It can encrypt, decrypt, sign and
 verify, compress and uncompress S/MIME messages.
 
-=head1 COMMAND OPTIONS
+=head1 OPTIONS
 
 There are fourteen operation options that set the type of operation to be
 performed. The meaning of the other options varies according to the operation
index 0edff8d0f2ca415eaa8a88225432bec967c2ce71..2fad2101ee9bf6da1b06d2201aad721df15e3d72 100644 (file)
@@ -26,7 +26,7 @@ B<openssl> B<crl>
 
 The B<crl> command processes CRL files in DER or PEM format.
 
-=head1 COMMAND OPTIONS
+=head1 OPTIONS
 
 =over 4
 
index 4056543cf6398c26d5f738e9eb9663445031d934..8c679ea8fd4b5c7c7903bf06f5bb81e8dc37a9ff 100644 (file)
@@ -21,7 +21,7 @@ The B<crl2pkcs7> command takes an optional CRL and one or more
 certificates and converts them into a PKCS#7 degenerate "certificates
 only" structure.
 
-=head1 COMMAND OPTIONS
+=head1 OPTIONS
 
 =over 4
 
index caa06966e502267bf4f34c948a5e304dc3999122..0e4f508fabbebf2c7ae4639c0ad162654f61afcd 100644 (file)
@@ -37,7 +37,7 @@ forms and their components printed out. B<Note> This command uses the
 traditional SSLeay compatible format for private key encryption: newer
 applications should use the more secure PKCS#8 format using the B<pkcs8>
 
-=head1 COMMAND OPTIONS
+=head1 OPTIONS
 
 =over 4
 
index 758709f081dd5c0fc3595a041c6691198a6a398e..a5f920e841d0a259cffdfa45b9e2b8e9a7a4ade4 100644 (file)
@@ -36,7 +36,7 @@ private key format specified in 'SEC 1: Elliptic Curve Cryptography'
 (http://www.secg.org/). To convert an OpenSSL EC private key into the
 PKCS#8 private key format use the B<pkcs8> command.
 
-=head1 COMMAND OPTIONS
+=head1 OPTIONS
 
 =over 4
 
index d237cddba100231ed26c2ec5c55afcab9b843e18..8dfe49a5e4048f9bd0dd6de5d59fcb788a04aabc 100644 (file)
@@ -15,7 +15,7 @@ numerical forms will be available. The B<errstr> utility can be used to
 display the meaning of the hex code. The hex code is the hex digits after the
 second colon.
 
-=head1 COMMAND OPTIONS
+=head1 OPTIONS
 
 None.
 
index 4765aecea843620dc1c0026a71a17e48c65da21d..a90f8a00260a62f5062ea35ea460de0f0b6d5322 100644 (file)
@@ -19,7 +19,7 @@ sequence and prints out the certificates contained in it or takes a
 file of certificates and converts it into a Netscape certificate
 sequence.
 
-=head1 COMMAND OPTIONS
+=head1 OPTIONS
 
 =over 4
 
index 75273a9b25748a69230c220908bdca6dc2082b2e..ec82088fae0f5bdd4554b2aa75eb5adbc6209fc5 100644 (file)
@@ -95,7 +95,7 @@ The B<ocsp> command performs many common OCSP tasks. It can be used
 to print out requests and responses, create requests and send queries
 to an OCSP responder and behave like a mini OCSP server itself.
 
-=head1 COMMAND OPTIONS
+=head1 OPTIONS
 
 This command operates as either a client or a server.
 The options are described below, divided into those two modes.
index c177c8a6699a0eb17f9a79199f685c874f074d07..a7e65ff70d18c3292b82f271bf0b43f368211e4e 100644 (file)
@@ -350,7 +350,7 @@ RC5 Cipher
 
 =back
 
-=head1 COMMAND OPTIONS
+=head1 OPTIONS
 
 Details of which options are available depend on the specific command.
 This section describes some common options with common behavior.
index e851018cfd1bc999cf6fab24b4fc9d8fa2539399..3dea46cdcfba5551e33bc0183d15dbbd20eb4add 100644 (file)
@@ -49,7 +49,7 @@ The B<pkcs12> command allows PKCS#12 files (sometimes referred to as
 PFX files) to be created and parsed. PKCS#12 files are used by several
 programs including Netscape, MSIE and MS Outlook.
 
-=head1 COMMAND OPTIONS
+=head1 OPTIONS
 
 There are a lot of options the meaning of some depends of whether a PKCS#12 file
 is being created or parsed. By default a PKCS#12 file is parsed. A PKCS#12
index 8c3c11f88b9b4ba0d148ab092c5e8dc6fee56190..d238946b34f9b3e6473cafa92bec1d2afb376172 100644 (file)
@@ -21,7 +21,7 @@ B<openssl> B<pkcs7>
 
 The B<pkcs7> command processes PKCS#7 files in DER or PEM format.
 
-=head1 COMMAND OPTIONS
+=head1 OPTIONS
 
 =over 4
 
index cd6db02a59acacbca1c318327720dc8e3b3d7280..dee64a00199ae8b6aa668739d02634e142bdc09f 100644 (file)
@@ -34,7 +34,7 @@ The B<pkcs8> command processes private keys in PKCS#8 format. It can handle
 both unencrypted PKCS#8 PrivateKeyInfo format and EncryptedPrivateKeyInfo
 format with a variety of PKCS#5 (v1.5 and v2.0) and PKCS#12 algorithms.
 
-=head1 COMMAND OPTIONS
+=head1 OPTIONS
 
 =over 4
 
index dc736a3370df0e8480a8a61dafa0f71b5d992537..2119c70c7ad9272b690af2bf8b81710ced814783 100644 (file)
@@ -28,7 +28,7 @@ B<openssl> B<pkey>
 The B<pkey> command processes public or private keys. They can be converted
 between various forms and their components printed out.
 
-=head1 COMMAND OPTIONS
+=head1 OPTIONS
 
 =over 4
 
index 6a8c4a806bb547ac260cbbf544835196f119ea6e..755915ff9b678431381dcbc9fcbd354b673e8d79 100644 (file)
@@ -19,7 +19,7 @@ B<openssl> B<pkeyparam>
 The B<pkey> command processes public or private keys. They can be converted
 between various forms and their components printed out.
 
-=head1 COMMAND OPTIONS
+=head1 OPTIONS
 
 =over 4
 
index e41f3b719c0354063c80493f80f65721b0a8b400..ceb9de34b42a1ec279deaec4796efa19a485ad3c 100644 (file)
@@ -38,7 +38,7 @@ B<openssl> B<pkeyutl>
 The B<pkeyutl> command can be used to perform public key operations using
 any supported algorithm.
 
-=head1 COMMAND OPTIONS
+=head1 OPTIONS
 
 =over 4
 
index 299d092799636fcb51f501f7be3e9665e9319c29..8362f53d8c575407fd3f6301c830cebe9075af09 100644 (file)
@@ -52,7 +52,7 @@ The B<req> command primarily creates and processes certificate requests
 in PKCS#10 format. It can additionally create self signed certificates
 for use as root CAs for example.
 
-=head1 COMMAND OPTIONS
+=head1 OPTIONS
 
 =over 4
 
index c3178ab398452552d22ac50196ae529fc5bd406e..8e9943fe58bf125b4e87ea98ea644d9e5777b87a 100644 (file)
@@ -41,7 +41,7 @@ traditional SSLeay compatible format for private key encryption: newer
 applications should use the more secure PKCS#8 format using the B<pkcs8>
 utility.
 
-=head1 COMMAND OPTIONS
+=head1 OPTIONS
 
 =over 4
 
index 325c6911d6e8ee230a6a4222f9c4e18201778210..038f00be44d13100ebd14fb4e7c69fd06bfbcf35 100644 (file)
@@ -29,7 +29,7 @@ B<openssl> B<rsautl>
 The B<rsautl> command can be used to sign, verify, encrypt and decrypt
 data using the RSA algorithm.
 
-=head1 COMMAND OPTIONS
+=head1 OPTIONS
 
 =over 4
 
index 3694f7d83839898e1328ab5a737cf312e819e2f5..19ac9a75b1e3f5b2327d38cb9ff6f02608423fb8 100644 (file)
@@ -24,7 +24,7 @@ master key) in human readable format. Since this is a diagnostic tool that
 needs some knowledge of the SSL protocol to use properly, most users will
 not need to use it.
 
-=head1 COMMAND OPTIONS
+=head1 OPTIONS
 
 =over 4
 
index ba59eda26feff6379ed6e053196b78fea3c21fb6..7980e35e774505e01cea72951feed43af72db293 100644 (file)
@@ -74,7 +74,7 @@ B<openssl> B<smime>
 The B<smime> command handles S/MIME mail. It can encrypt, decrypt, sign and
 verify S/MIME messages.
 
-=head1 COMMAND OPTIONS
+=head1 OPTIONS
 
 There are six operation options that set the type of operation to be performed.
 The meaning of the other options varies according to the operation type.
index 35c6a128d8529726a109f016bdbee711e19ce8a8..8955bc445d515a2f53437a308a539cad7a21282d 100644 (file)
@@ -26,7 +26,7 @@ The B<spkac> command processes Netscape signed public key and challenge
 (SPKAC) files. It can print out their contents, verify the signature and
 produce its own SPKACs from a supplied private key.
 
-=head1 COMMAND OPTIONS
+=head1 OPTIONS
 
 =over 4
 
index 0fd1799af25a20c394f4bd15480d7a735d881397..8ba5ff67e418c7910e47840a5b72ac3cc5e85e9c 100644 (file)
@@ -55,7 +55,7 @@ B<openssl> B<verify>
 
 The B<verify> command verifies certificate chains.
 
-=head1 COMMAND OPTIONS
+=head1 OPTIONS
 
 =over 4
 
index d809d7a54e7b7a6bb36633f6f47374ec0ccfb094..7368a401fcf87ac7f08d2b10bcba318e1b45e9ab 100644 (file)
@@ -2,8 +2,8 @@
 
 =head1 NAME
 
-ERR_GET_LIB, ERR_GET_FUNC, ERR_GET_REASON - get library, function and
-reason code
+ERR_GET_LIB, ERR_GET_FUNC, ERR_GET_REASON, ERR_FATAL_ERROR
+- get information from error codes
 
 =head1 SYNOPSIS
 
index a903318f74b8a8ea9e941dabe8e99050c2356d3f..db578e506aeb3967fce47540a39436347650d38c 100644 (file)
@@ -409,8 +409,8 @@ The ChaCha20 stream cipher. The key length is 256 bits, the IV is 96 bits long.
 
 Authenticated encryption with ChaCha20-Poly1305. Like EVP_chacha20() the key is
 256 bits and the IV is 96 bits. This supports additional authenticated
-data (AAD) and produces a 128 bit authentication tag. The L</GCM and OCB modes>
-section below applies.
+data (AAD) and produces a 128 bit authentication tag. See the
+L</GCM and OCB Modes> section for more information.
 
 =back
 
index dd96c1fb3ec656cbeb6a14108b4d6ba15326df11..58d22b63d75cbbf4ed971777ffed0cb3a4016744 100644 (file)
@@ -39,41 +39,41 @@ used in preference. The ownership rules are as follows:
 
 =over 4
 
-=item
+=item *
 
 If neither the rbio or wbio have changed from their previous values then nothing
 is done.
 
-=item
+=item *
 
 If the rbio and wbio parameters are different and both are different to their
 previously set values then one reference is consumed for the rbio and one
 reference is consumed for the wbio.
 
-=item
+=item *
 
 If the rbio and wbio parameters are the same and the rbio is not the same as the
 previously set value then one reference is consumed.
 
-=item
+=item *
 
 If the rbio and wbio parameters are the same and the rbio is the same as the
 previously set value, then no additional references are consumed.
 
-=item
+=item *
 
 If the rbio and wbio parameters are different and the rbio is the same as the
 previously set value then one reference is consumbed for the wbio and no
 references are consumed for the rbio.
 
-=item
+=item *
 
 If the rbio and wbio parameters are different and the wbio is the same as the
 previously set value and the old rbio and wbio values were the same as each
 other then one reference is consumed for the rbio and no references are consumed
 for the wbio.
 
-=item
+=item *
 
 If the rbio and wbio parameters are different and the wbio is the same as the
 previously set value and the old rbio and wbio values were different to each
index 8945fa6879245176dcf53fe2d4bf37003bf42155..fc795b8789b6149d584a4bfcfb51f8bc4bb8db83 100755 (executable)
@@ -41,8 +41,8 @@ my $OUT;
 
 my %mandatory_sections =
     ( '*'    => [ 'NAME', 'DESCRIPTION', 'COPYRIGHT' ],
-      1      => [ 'SYNOPSIS', '(COMMAND\s+)?OPTIONS' ],
-      3      => [ 'SYNOPSIS', 'RETURN\s+VALUES' ],
+      1      => [ 'SYNOPSIS', 'OPTIONS' ],
+      3      => [ 'SYNOPSIS', 'RETURN VALUES' ],
       5      => [ ],
       7      => [ ] );
 
@@ -174,7 +174,7 @@ sub check()
     $section = $1 if $dirname =~ /man([1-9])/;
 
     foreach ((@{$mandatory_sections{'*'}}, @{$mandatory_sections{$section}})) {
-        print "$id doesn't have a head1 section matching $_\n"
+        print "$id: missing $_ head1 section\n"
             if $contents !~ /^=head1\s+${_}\s*$/m;
     }
 
@@ -257,6 +257,9 @@ getopts('nshu');
 
 &help() if ( $opt_h );
 
+die "Need one of -n -s or -u flags.\n"
+    unless $opt_n or $opt_s or $opt_u;
+
 if ( $opt_n or $opt_s ) {
     foreach (@ARGV ? @ARGV : glob('doc/*/*.pod')) {
         &check($_);