Commit Graph

70 Commits

Author SHA1 Message Date
Benjamin Kaduk
0e2e260ed2 Assorted updates to md5.1
Note that the -c argument's parameter is compared against the digest of
the file, not the file. [1]

Update the "current time" parentheticals for notes about reversing
and colliding the hash functions. [1]

Some general mdoc updates.

PR:		docs/188043 [1]
Submitted by:	Jamie Landeg-Jones [1]
Approved by:	hrs (mentor)
MFC after:	1 week
2014-05-18 21:16:59 +00:00
Ed Schouten
7e659f9491 Add the Clang specific -Wmissing-variable-declarations to WARNS=6.
This compiler flag enforces that that people either mark variables
static or use an external declarations for the variable, similar to how
-Wmissing-prototypes works for functions.

Due to the fact that Yacc/Lex generate code that cannot trivially be
changed to not warn because of this (lots of yy* variables), add a
NO_WMISSING_VARIABLE_DECLARATIONS that can be used to turn off this
specific compiler warning.

Announced on:	toolchain@
2013-04-19 19:45:00 +00:00
Xin LI
edd4c16f78 Teach md5(1) about sha512.
MFC after:	1 month
2012-08-01 00:36:12 +00:00
Glen Barber
2fccbf04cc General mdoc(7) and typo fixes.
PR:		167696
Submitted by:	Nobuyuki Koganemaru (kogane!jp.freebsd.org)
MFC after:	3 days
2012-05-10 02:07:00 +00:00
Eitan Adler
cf0badf098 Document the -c option in --help output
PR:		bin/167463
Submitted by:	"Bryan Drewery" <bryan@shatow.net>
Approved by:	cperciva
MFC after:	3 days
2012-05-09 17:32:10 +00:00
Eitan Adler
c72006871d - new sentence should start on new line.
PR:		bin/146541
Submitted by:	bjk
Approved by:	bjk
2011-11-13 17:07:43 +00:00
Eitan Adler
745253594b - add "check" option to MD5 and friends to compare files against known hash.
PR:		bin/146541
Submitted by:	eadler
Reviewed by:	jhell@dataix.net
Approved by:	secteam (cperciva)
Approved by:	cperciva
MFC after:	3 weeks
2011-11-13 16:35:47 +00:00
Ruslan Ermilov
106d839190 Switch the default WARNS level for sbin/ to 6.
Submitted by:	Ulrich Spörlein
2009-10-19 16:00:24 +00:00
Simon L. B. Nielsen
0211d3b61c Minor markup fix for the r186836 update. 2009-01-06 21:16:42 +00:00
Colin Percival
4c55b9e02e Strengthen some of the language concerning attacks on MD5, in light of the
recent demonstration of a forged SSL certificate.  Add text pointing out
that SHA-1 is at least theoretically broken.  Add a recommendation that
new applications use SHA-256.

MFC after:	1 month
2009-01-06 19:25:24 +00:00
Tom Rhodes
8156052b20 Bring a paragraph in this manual page a bit closer to the present date.
Discussed with:	des
2008-09-07 15:19:34 +00:00
Kevin Lo
1f0e597d5a Use RUSAGE_SELF for the current process instead of hardcoded value 2008-09-02 02:59:13 +00:00
David E. O'Brien
9c6c6249d1 style(9) (verifed no-change in .o's) 2008-02-07 18:10:24 +00:00
Poul-Henning Kamp
25a14196dd Fix an 11 year old mistake: Let the hash functions take a void* instead
of unsigned char* argument.
2006-01-17 15:35:57 +00:00
Colin Percival
2fc230e298 Belatedly update the md5(1) man page to reflect the addition of sha256. 2005-03-10 09:56:39 +00:00
Colin Percival
186c183c23 In light of the recent 2^69 operation collision-finding attack on SHA1,
add support for SHA256.

Tested on:	i386, sparc64
Tested using:	NIST test vectors, built-in tests
X-MFC-after:	5.4-RELEASE
2005-03-09 19:23:04 +00:00
Ruslan Ermilov
a866e17077 Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
Ruslan Ermilov
2410103c1d mdoc(7) fixes. 2004-07-07 19:57:16 +00:00
Oliver Eikemeier
7b89c134f9 fix handling of an unknown progeam name
Noticed by:	Joshua Goodall <joshua@roughtrade.net>
Approved by:	ru
2004-06-22 09:18:50 +00:00
Oliver Eikemeier
cb49d42b60 Add sha1 and rmd160 checksum tools.
Since the algorithms are already supported in libmd,
the size increase is small when a dynamic root is used.

Approved by:	joerg, ru
MFC after:	2 weeks
2004-06-11 16:07:02 +00:00
Ruslan Ermilov
d04b5dfe6c Assorted markup, grammar, and spelling fixes. 2004-05-17 08:35:43 +00:00
Ruslan Ermilov
47d7e8a96f Fixed style of DPADD and LDADD assignments as per style.Makefile(5). 2004-02-05 22:44:25 +00:00
Stefan Eßer
5758d949d5 Set exit code to 1 in case at least one of the input files
could not be opened.
2003-11-02 23:12:08 +00:00
David E. O'Brien
c69284ca08 Use __FBSDID() to quiet GCC 3.3 warnings. 2003-05-03 18:41:59 +00:00
Mike Silbersack
ed4edda03a Improvements to md5.c so that it uses getrusage to time
benchmarks, and prints out results in float format.
2003-02-14 04:48:06 +00:00
Mike Silbersack
bbe7088205 Change the -x option so that it does an actual REAL test of
the correctness of this program.  Previously, it printed out
the MD5 values of some test strings, but did not tell you
if they were correct or not!
2003-01-26 08:23:37 +00:00
Philippe Charnier
92b425d0bd Use `The .Nm utility' 2002-04-19 23:06:29 +00:00
Poul-Henning Kamp
dc015e16dc Fix
md5 -q -s foo
to not expect input on stdin after hashing the string.

MFC after:      1 week
2001-12-19 21:19:43 +00:00
David E. O'Brien
2d68bf45bf Default to WARNS=2.
Binary builds that cannot handle this must explicitly set WARNS=0.

Reviewed by:	mike
2001-12-04 02:19:58 +00:00
Matthew Dillon
484a709abe Add missing cast for improper time_t use in computation. 2001-10-28 00:01:58 +00:00
Ruslan Ermilov
ee355dcb9e mdoc(7) police: removed hard sentence breaks. 2001-09-04 09:28:48 +00:00
Murray Stokely
cc2a5b08a7 Mention collision attacks on MD5. From the md5(3) man page.
PR:		docs/14158
Reviewed by:	kris
Submitted by:	Eric Frias <efrias@sg505.net>
2001-09-04 01:01:07 +00:00
Ruslan Ermilov
c4d9468ea0 mdoc(7) police:
Avoid using parenthesis enclosure macros (.Pq and .Po/.Pc) with plain text.
Not only this slows down the mdoc(7) processing significantly, but it also
has an undesired (in this case) effect of disabling hyphenation within the
entire enclosed block.
2001-08-07 15:48:51 +00:00
Dima Dorfman
7ebcc426ef Remove whitespace at EOL. 2001-07-15 07:53:42 +00:00
Dag-Erling Smørgrav
40dbfd1a48 Fix include ordering breakage from rev. 1.23.
Please-read-style(9):	dd
2001-06-29 06:21:57 +00:00
Ruslan Ermilov
085d234587 Only checksum stdin if nothing has been checksummed yet.
PR:		bin/28386
2001-06-25 08:52:57 +00:00
Dima Dorfman
cafefe8c1b Include missing header files which define functions for which gcc has
builtins (e.g., exit, strcmp).
2001-06-24 23:04:23 +00:00
Dima Dorfman
982f5d88ff WARNS= -> WARNS?=
Submitted by:	Mike Barcroft <mike@q9media.com>
2001-06-22 21:38:30 +00:00
Dima Dorfman
042b6e862b This command has more than four options. 2001-06-19 03:34:03 +00:00
Ruslan Ermilov
05fe5d5620 Fix argument processing.
Make this compile with WARNS=2.

PR:		bin/27524
MFC after:	3 days
2001-05-22 10:33:43 +00:00
Ruslan Ermilov
0a5779d45b - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:33:27 +00:00
Ruslan Ermilov
fe655281c5 Set the default manual section for sbin/ to 8. 2001-03-20 18:13:31 +00:00
Ruslan Ermilov
47dec78170 mdoc(7) police: use the default ``file ...'' feature of the .Ar macro. 2001-02-13 09:56:35 +00:00
Ruslan Ermilov
7c7fb079b9 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 16:52:27 +00:00
David E. O'Brien
42ea2a63f7 Update usage().
Submitted by:	nectar
2000-11-08 20:41:35 +00:00
David E. O'Brien
2963da13bf Add -q quite mode. 1999-12-04 01:29:43 +00:00
David E. O'Brien
73fd27179f Make `-r -s' also match the BSDI output. 1999-11-11 11:59:03 +00:00
David E. O'Brien
53151fddc0 Change the "-r" output format to match BSDI's default output format. 1999-11-09 17:28:47 +00:00
David E. O'Brien
9e18a3bdd2 Add a new "-r" (right) option that reverses the order a filename and the
hash is printed.  This aids visual diffs.
1999-11-07 04:14:55 +00:00
Peter Wemm
7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00