*  doc/coreutils.texi (md5sum invocation, sha1sum invocation,
b2sum invocation, sha2 utilities): Mention these are legacy interfaces,
and reference 'cksum invocation'.
*  src/cksum.c (usage): Likewise.
*  man/md5sum.x: Redirect to cksum, rather than individual utils.
*  man/sha1sum.x: Likewise.
---
 doc/coreutils.texi | 13 ++++++++++++-
 man/md5sum.x       |  5 ++---
 man/sha1sum.x      |  7 +++----
 src/cksum.c        | 10 +++++++++-
 4 files changed, 26 insertions(+), 9 deletions(-)

diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index e324b886d..c3c906d4a 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -4203,6 +4203,12 @@ Also file name escaping is not used.
 @command{md5sum} computes a 128-bit checksum (or @dfn{fingerprint} or
 @dfn{message-digest}) for each specified @var{file}.
 
+@macro legacyDigest
+Legacy interface to the more modern @command{cksum} utility.
+@xref{cksum invocation}.
+@end macro
+@legacyDigest
+
 @macro weakHash{hash}
 The \hash\ digest is more reliable than a simple CRC (provided by
 the @command{cksum} command) for detecting accidental file corruption,
@@ -4214,7 +4220,6 @@ to modify certain files, including digital certificates, 
so that they
 appear valid when signed with an \hash\ digest.  For more secure hashes,
 consider using @samp{sha2}, @samp{sha3}, or @samp{blake2b},
 available through the @command{cksum} @option{--algorithm} option.
-@xref{cksum invocation}.
 @end macro
 @weakHash{MD5}
 
@@ -4251,6 +4256,8 @@ The program accepts @ref{cksum common options}.  Also see 
@ref{Common options}.
 @command{b2sum} computes a 512-bit checksum for each specified
 @var{file}.
 
+@legacyDigest
+
 @checksumUsage{b2sum}
 
 In addition @command{b2sum} supports the following options.
@@ -4282,6 +4289,8 @@ as the length is automatically determined when checking.
 
 @command{sha1sum} computes a 160-bit checksum for each specified @var{file}.
 
+@legacyDigest
+
 @weakHash{SHA-1}
 
 @checksumUsage{sha1sum}
@@ -4289,6 +4298,8 @@ as the length is automatically determined when checking.
 @node sha2 utilities
 @section sha2 utilities: Print or check SHA-2 digests
 
+@legacyDigest
+
 @pindex sha224sum
 @pindex sha256sum
 @pindex sha384sum
diff --git a/man/md5sum.x b/man/md5sum.x
index 3f4cc6409..c8fd8c0ed 100644
--- a/man/md5sum.x
+++ b/man/md5sum.x
@@ -4,8 +4,7 @@ md5sum \- compute and check MD5 message digest
 .\" Add any additional description here
 [BUGS]
 Do not use the MD5 algorithm for security related purposes.
-Instead, use an SHA\-2 algorithm, implemented in the programs
-sha224sum(1), sha256sum(1), sha384sum(1), sha512sum(1),
-or the BLAKE2 algorithm, implemented in b2sum(1)
+Instead, use an SHA\-2, SHA\-3, or BLAKE2 algorithm,
+implemented in the cksum(1) program.
 [SEE ALSO]
 cksum(1)
diff --git a/man/sha1sum.x b/man/sha1sum.x
index 8fd824f10..fb2851390 100644
--- a/man/sha1sum.x
+++ b/man/sha1sum.x
@@ -3,9 +3,8 @@ sha1sum \- compute and check SHA1 message digest
 [DESCRIPTION]
 .\" Add any additional description here
 [BUGS]
-Do not use the SHA-1 algorithm for security related purposes.
-Instead, use an SHA\-2 algorithm, implemented in the programs
-sha224sum(1), sha256sum(1), sha384sum(1), sha512sum(1),
-or the BLAKE2 algorithm, implemented in b2sum(1)
+Do not use the MD5 algorithm for security related purposes.
+Instead, use an SHA\-2, SHA\-3, or BLAKE2 algorithm,
+implemented in the cksum(1) program.
 [SEE ALSO]
 cksum(1)
diff --git a/src/cksum.c b/src/cksum.c
index 7d6ff982b..8c9f8ac84 100644
--- a/src/cksum.c
+++ b/src/cksum.c
@@ -487,9 +487,14 @@ Usage: %s [OPTION]... [FILE]...\n\
 "), program_name);
 #if HASH_ALGO_CKSUM
     if (legacy_mode)
-      printf (_("\
+      {
+        printf (_("\
 Print or check %s checksums.\n\
 "), DIGEST_TYPE_STRING);
+        fputs (_("\
+Legacy interface to the cksum utility.\n\
+"), stdout);
+      }
     else
       fputs (_("\
 Print or verify checksums.\n\
@@ -501,6 +506,9 @@ Print or check %s (%d-bit) checksums.\n\
 "),
               DIGEST_TYPE_STRING,
               DIGEST_BITS);
+      fputs (_("\
+Legacy interface to the cksum utility.\n\
+"), stdout);
 #endif
 
       emit_stdin_note ();
-- 
2.52.0


Reply via email to