OpenBSD CVS

CVS log for src/bin/md5/md5.c


[BACK] Up to [local] / src / bin / md5

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.98 / (download) - annotate - [select for diffs], Tue Oct 31 19:37:17 2023 UTC (7 months, 1 week ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, HEAD
Changes since 1.97: +26 -23 lines
Diff to previous 1.97 (colored)

cksum -c: support checking base64 digests in reverse mode too.

In reverse mode, the entry does not include the digest algorithm
so the specified algorithm (or the default) is used when checking.
OK deraadt@

Revision 1.97 / (download) - annotate - [select for diffs], Mon Oct 19 18:15:18 2020 UTC (3 years, 7 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.96: +2 -2 lines
Diff to previous 1.96 (colored)

Add explicit casts to double to quiet a clang warning.
OK deraddt@

Revision 1.96 / (download) - annotate - [select for diffs], Sat Oct 3 00:37:06 2020 UTC (3 years, 8 months ago) by millert
Branch: MAIN
Changes since 1.95: +3 -2 lines
Diff to previous 1.95 (colored)

Use ferror() to check for write error, not the fflush() return value.
We can't rely on buffering to catch write errors in fflush().
Based on a diff from Demi M. Obenour, OK kn@

Revision 1.95 / (download) - annotate - [select for diffs], Sat May 18 16:53:39 2019 UTC (5 years ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.94: +2 -2 lines
Diff to previous 1.94 (colored)

freezero() is of no use here, the computed digest is not a secret.
ok millert@

Revision 1.94 / (download) - annotate - [select for diffs], Fri Jan 25 00:19:25 2019 UTC (5 years, 4 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.93: +2 -2 lines
Diff to previous 1.93 (colored)

I am retiring my old email address;  replace it with my OpenBSD one.

Revision 1.93 / (download) - annotate - [select for diffs], Fri Sep 7 14:54:49 2018 UTC (5 years, 9 months ago) by cheloha
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.92: +20 -21 lines
Diff to previous 1.92 (colored)

fgetln(3) -> getline(3); from Lauri Tirkkonen; ok millert@

Revision 1.92 / (download) - annotate - [select for diffs], Mon Sep 11 16:35:38 2017 UTC (6 years, 9 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.91: +7 -5 lines
Diff to previous 1.91 (colored)

Use getrusage(2) for the built-in time trial instead of getttimeofday(2).
This makes it possible to measure just the ellapsed user time, which
is what we really care about when benchmarking an algorithm.
OK deraadt@

Revision 1.91 / (download) - annotate - [select for diffs], Mon May 22 16:00:47 2017 UTC (7 years ago) by deraadt
Branch: MAIN
Changes since 1.90: +2 -3 lines
Diff to previous 1.90 (colored)

obvious use for freezero()

Revision 1.90 / (download) - annotate - [select for diffs], Wed Apr 26 21:10:42 2017 UTC (7 years, 1 month ago) by millert
Branch: MAIN
Changes since 1.89: +22 -6 lines
Diff to previous 1.89 (colored)

In -C mode, process all checksums that match the specified file(s),
not just the first one that matches.  OK deraadt@

Revision 1.89 / (download) - annotate - [select for diffs], Fri Dec 16 17:55:26 2016 UTC (7 years, 5 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.88: +3 -4 lines
Diff to previous 1.88 (colored)

Move declaration of an 'i' inside the scope of its use. Which in
turn is inside an #ifdef. Thus making the code clearer by eliminating
an #ifdef in the middle of the declarations.

Suggested by millert@

Revision 1.88 / (download) - annotate - [select for diffs], Fri Dec 16 17:44:59 2016 UTC (7 years, 5 months ago) by krw
Branch: MAIN
Changes since 1.87: +5 -2 lines
Diff to previous 1.87 (colored)

Eliminate some gcc warnings about 'unused variables', mostly by
adding appropriate #ifdef's around declarations.

ok millert@ (with a tweak I will commit separately)

Revision 1.87 / (download) - annotate - [select for diffs], Sat Sep 3 17:01:01 2016 UTC (7 years, 9 months ago) by tedu
Branch: MAIN
Changes since 1.86: +12 -1 lines
Diff to previous 1.86 (colored)

add sha512/256 support to check that the libc code is right :)

Revision 1.86 / (download) - annotate - [select for diffs], Fri Aug 26 05:50:29 2016 UTC (7 years, 9 months ago) by guenther
Branch: MAIN
Changes since 1.85: +2 -1 lines
Diff to previous 1.85 (colored)

Pull in <sys/time.h> for gettimeofday()

Revision 1.85 / (download) - annotate - [select for diffs], Fri Jul 29 18:35:45 2016 UTC (7 years, 10 months ago) by tedu
Branch: MAIN
Changes since 1.84: +17 -18 lines
Diff to previous 1.84 (colored)

all of the update functions take a size_t. correct type and casts.
ok deraadt millert

Revision 1.84 / (download) - annotate - [select for diffs], Wed Dec 9 19:36:17 2015 UTC (8 years, 6 months ago) by mmcc
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.83: +2 -3 lines
Diff to previous 1.83 (colored)

Remove NULL-check before free(). ok tb@

Revision 1.83 / (download) - annotate - [select for diffs], Sat Oct 10 20:18:30 2015 UTC (8 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.82: +2 -2 lines
Diff to previous 1.82 (colored)

normalize the ordering of tame requests (particularily, "rpath wpath cpath",
which i have put in that order). this is not important, but helps look
for outliers which might be strange.  it hints that "ioctl" should be
reassessed in a few places, to see if "tty" is better; that "unix" may
be used in some places where "route" could now work.

Revision 1.82 / (download) - annotate - [select for diffs], Fri Oct 9 01:37:06 2015 UTC (8 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.81: +5 -5 lines
Diff to previous 1.81 (colored)

Change all tame callers to namechange to pledge(2).

Revision 1.81 / (download) - annotate - [select for diffs], Sun Oct 4 04:56:50 2015 UTC (8 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.80: +2 -2 lines
Diff to previous 1.80 (colored)

Repair tame() error check to be == -1

Revision 1.80 / (download) - annotate - [select for diffs], Sat Oct 3 03:28:35 2015 UTC (8 years, 8 months ago) by deraadt
Branch: MAIN
Changes since 1.79: +7 -1 lines
Diff to previous 1.79 (colored)

right at startup, this can tame "stdio cpath rpath wpath".  after getopt
-h has handled write/creating a file, we can drop to tame "stdio rpath"
since md5 will only read files after that.
i believe i involved lteo for this.

Revision 1.79 / (download) - annotate - [select for diffs], Mon Jan 19 16:43:28 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.78: +4 -2 lines
Diff to previous 1.78 (colored)

cleanup of the SMALL hiding from Mathias Svensson

Revision 1.78 / (download) - annotate - [select for diffs], Fri Jan 16 06:39:32 2015 UTC (9 years, 4 months ago) by deraadt
Branch: MAIN
Changes since 1.77: +5 -5 lines
Diff to previous 1.77 (colored)

Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible.  Annotate <sys/param.h> lines with their current reasons.  Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc.  Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution.  These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)

Revision 1.77 / (download) - annotate - [select for diffs], Sat Sep 13 16:06:36 2014 UTC (9 years, 8 months ago) by doug
Branch: MAIN
Changes since 1.76: +2 -2 lines
Diff to previous 1.76 (colored)

Replace all queue *_END macro calls except CIRCLEQ_END with NULL.

CIRCLEQ_* is deprecated and not called in the tree.  The other queue types
have *_END macros which were added for symmetry with CIRCLEQ_END.  They are
defined as NULL.  There's no reason to keep the other *_END macro calls.

ok millert@

Revision 1.76 / (download) - annotate - [select for diffs], Thu Jun 19 15:30:49 2014 UTC (9 years, 11 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.75: +5 -1 lines
Diff to previous 1.75 (colored)

Fix memory leak in digest_file() on ferror().  OK tedu@ lteo@

Revision 1.75 / (download) - annotate - [select for diffs], Wed Mar 26 03:16:39 2014 UTC (10 years, 2 months ago) by lteo
Branch: MAIN
Changes since 1.74: +2 -2 lines
Diff to previous 1.74 (colored)

Ignore the -b option if cksum is called as-is (e.g. "cksum -b /bsd")
as documented on the cksum(1) man page.

"looks right" deraadt@
ok millert@

Revision 1.74 / (download) - annotate - [select for diffs], Thu Mar 20 22:03:56 2014 UTC (10 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.73: +5 -46 lines
Diff to previous 1.73 (colored)

purge sum and sysvsum code. ok deraadt jmc lteo millert
a few initial leftovers spotted by naddy

Revision 1.73 / (download) - annotate - [select for diffs], Thu Mar 20 20:32:42 2014 UTC (10 years, 2 months ago) by naddy
Branch: MAIN
Changes since 1.72: +1 -13 lines
Diff to previous 1.72 (colored)

remove insecure MD4 checksum algorithm; ok tedu@, man page ok jmc@

"A collision attack published in 2007 can find collisions for full
MD4 in less than two hash operations."

Revision 1.72 / (download) - annotate - [select for diffs], Fri Mar 7 04:10:55 2014 UTC (10 years, 3 months ago) by lteo
Branch: MAIN
Changes since 1.71: +27 -14 lines
Diff to previous 1.71 (colored)

When using the -C option, exit with an exit status of 1 if any of the
files specified on the command line do not exist in the checklist.

ok deraadt@ tedu@

Revision 1.71 / (download) - annotate - [select for diffs], Wed Jan 15 16:07:27 2014 UTC (10 years, 4 months ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.70: +4 -4 lines
Diff to previous 1.70 (colored)

add -C to the man page, and adjust usage();
ok lteo

Revision 1.70 / (download) - annotate - [select for diffs], Wed Jan 15 04:43:36 2014 UTC (10 years, 4 months ago) by lteo
Branch: MAIN
Changes since 1.69: +35 -14 lines
Diff to previous 1.69 (colored)

Add support for a -C option.  It works on a checklist like -c but only
does the checksum comparison for selected files that are specified on
the command line.

idea discussed with deraadt@ and tedu@
manpage feedback jmc@
feedback/OK deraadt@ millert@

Revision 1.69 / (download) - annotate - [select for diffs], Sun Jan 12 04:37:51 2014 UTC (10 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.68: +4 -4 lines
Diff to previous 1.68 (colored)

Also move case 'c' into the #ifdef for a smaller binary.  It will fall into
default, giving a nice failure.  I have not removed -c from the usage()
or getopt() because it is too much butchering...

Revision 1.68 / (download) - annotate - [select for diffs], Sat Jan 11 04:01:13 2014 UTC (10 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.67: +21 -21 lines
Diff to previous 1.67 (colored)

use -DSHA2_ONLY to be more clear about what we are butchering
idea from tedu

Revision 1.67 / (download) - annotate - [select for diffs], Fri Jan 10 20:14:08 2014 UTC (10 years, 5 months ago) by jmc
Branch: MAIN
Changes since 1.66: +7 -8 lines
Diff to previous 1.66 (colored)

catch up to the fact that md5/sha* got merged, and document -c consistently;
some style and cleanup tweaks while here

ok deraadt

Revision 1.66 / (download) - annotate - [select for diffs], Fri Jan 10 18:51:05 2014 UTC (10 years, 5 months ago) by lteo
Branch: MAIN
Changes since 1.65: +4 -2 lines
Diff to previous 1.65 (colored)

When using a checklist, print MISSING for non-existent files.

Based on an earlier diff by tedu@
Requested by deraadt@
OK deraadt@

Revision 1.65 / (download) - annotate - [select for diffs], Fri Jan 10 05:34:46 2014 UTC (10 years, 5 months ago) by tedu
Branch: MAIN
Changes since 1.64: +5 -3 lines
Diff to previous 1.64 (colored)

the -c option is really a mode change, incompatible with other options.
(there are some others too, but -c is particularly misleading.) split it
out in synopsis and usage.
ok deraadt

Revision 1.64 / (download) - annotate - [select for diffs], Wed Jan 8 16:23:21 2014 UTC (10 years, 5 months ago) by millert
Branch: MAIN
Changes since 1.63: +3 -3 lines
Diff to previous 1.63 (colored)

Fix wrapping of usage message for cksum.

Revision 1.63 / (download) - annotate - [select for diffs], Wed Jan 8 16:16:44 2014 UTC (10 years, 5 months ago) by millert
Branch: MAIN
Changes since 1.62: +5 -5 lines
Diff to previous 1.62 (colored)

err() not errx() when fopen fails.

Revision 1.62 / (download) - annotate - [select for diffs], Wed Jan 8 16:13:11 2014 UTC (10 years, 5 months ago) by millert
Branch: MAIN
Changes since 1.61: +28 -37 lines
Diff to previous 1.61 (colored)

Remove NHASHES, it is not needed and is incompatible with #ifdef SMALL.
Remove style_hash and style_cksum, adjust the style of the selected
algorithms based on rflag and qflag instead.

Revision 1.61 / (download) - annotate - [select for diffs], Wed Jan 8 15:54:09 2014 UTC (10 years, 5 months ago) by millert
Branch: MAIN
Changes since 1.60: +21 -38 lines
Diff to previous 1.60 (colored)

Remove pmode, fix hfile open mode, check return value when writing
file name to stdout.

Revision 1.60 / (download) - annotate - [select for diffs], Wed Jan 8 14:19:25 2014 UTC (10 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.59: +53 -12 lines
Diff to previous 1.59 (colored)

Add -DSMALL support to kill a lot of the unncecessary hashes and checksums
that the install media won't need
ok millert, but he used the word butcher!

Revision 1.59 / (download) - annotate - [select for diffs], Wed Jan 8 14:15:54 2014 UTC (10 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.58: +21 -12 lines
Diff to previous 1.58 (colored)

Add support for -h hashfile.  This is very useful with with -p, in a pipeline,
to deliver the hash output to a different location.
ok millert

Revision 1.58 / (download) - annotate - [select for diffs], Mon Dec 23 23:00:38 2013 UTC (10 years, 5 months ago) by tedu
Branch: MAIN
Changes since 1.57: +3 -20 lines
Diff to previous 1.57 (colored)

install a link as sha512. simplify program internals; there are only
two modes. ok deraadt gilles jca

Revision 1.57 / (download) - annotate - [select for diffs], Thu Nov 21 15:54:45 2013 UTC (10 years, 6 months ago) by deraadt
Branch: MAIN
Changes since 1.56: +3 -3 lines
Diff to previous 1.56 (colored)

add unsigned char casts for specific calls to ctype.h macros.
ok guenther step

Revision 1.56 / (download) - annotate - [select for diffs], Mon Apr 15 15:54:17 2013 UTC (11 years, 1 month ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.55: +12 -2 lines
Diff to previous 1.55 (colored)

SHA-224 is to SHA-256 as SHA-384 is to SHA-512.  It was added in a
later revision of FIPS-180.  OK miod@ jmc@ guenther@ djm@

Revision 1.55 / (download) - annotate - [select for diffs], Sat Mar 30 02:42:24 2013 UTC (11 years, 2 months ago) by lteo
Branch: MAIN
Changes since 1.54: +8 -7 lines
Diff to previous 1.54 (colored)

Return an exit code of 1 if the file cannot be opened (e.g. file does
not exist), or if there is an error reading the file stream.

From Patrik Lundin, thanks!

ok deraadt

Revision 1.54 / (download) - annotate - [select for diffs], Tue Dec 4 02:38:51 2012 UTC (11 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3
Changes since 1.53: +6 -2 lines
Diff to previous 1.53 (colored)

replace sys/param.h with sys/types.h (and sometimes add limits.h if needed)
ok guenther

Revision 1.53 / (download) - annotate - [select for diffs], Tue Jul 5 23:39:27 2011 UTC (12 years, 11 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.52: +3 -2 lines
Diff to previous 1.52 (colored)

fix memset sizeof, found by jsg. ok krw

Revision 1.52 / (download) - annotate - [select for diffs], Wed Oct 27 15:24:10 2010 UTC (13 years, 7 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.51: +3 -3 lines
Diff to previous 1.51 (colored)

Use a 32KB data buffer instead of a 1KB buffer.

Revision 1.51 / (download) - annotate - [select for diffs], Mon Oct 25 19:05:52 2010 UTC (13 years, 7 months ago) by millert
Branch: MAIN
Changes since 1.50: +25 -26 lines
Diff to previous 1.50 (colored)

Use stdio when reading in the file to be checksummed.  This can improve
performance due to the internal buffering stdio does wrt the optimal
read size (st_blksize).  OK mikeb@

Revision 1.50 / (download) - annotate - [select for diffs], Sat Sep 6 12:01:34 2008 UTC (15 years, 9 months ago) by djm
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.49: +14 -16 lines
Diff to previous 1.49 (colored)

adapt to sha2(3) API changes; ok millert@

Revision 1.49 / (download) - annotate - [select for diffs], Tue Jul 29 18:24:31 2008 UTC (15 years, 10 months ago) by sobrado
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.48: +56 -12 lines
Diff to previous 1.48 (colored)

md5(1), sha1(1), rmd160(1), cksum(1) and sum(1) have different options;
while here, some KNF improvements.

based on a diff for compress(1) written by millert@,
fixes from guenther@ and pyr@.

ok millert@, pyr@; (for the manual page tweaks) jmc@

Revision 1.48 / (download) - annotate - [select for diffs], Wed Nov 7 09:52:25 2007 UTC (16 years, 7 months ago) by chl
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.47: +5 -5 lines
Diff to previous 1.47 (colored)

properly exit >0 when encountering bad md5 in cheklist

ok gilles@ millert@

From Tim van der Molen <tbvdm.lists at xs4all.nl>

Revision 1.47 / (download) - annotate - [select for diffs], Wed Oct 31 20:47:39 2007 UTC (16 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.46: +2 -2 lines
Diff to previous 1.46 (colored)

clamp -ttttttttt test counter to 1B, so that it does not wrap negative;
from Nicholas Marriott, ok otto

Revision 1.46 / (download) - annotate - [select for diffs], Sat Apr 14 23:04:10 2007 UTC (17 years, 2 months ago) by grunk
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.45: +2 -2 lines
Diff to previous 1.45 (colored)

if we define a constant for the OPTSTRING, we can as well use it.

ok tedu@

Revision 1.45 / (download) - annotate - [select for diffs], Fri Apr 13 13:57:01 2007 UTC (17 years, 2 months ago) by tedu
Branch: MAIN
Changes since 1.44: +12 -9 lines
Diff to previous 1.44 (colored)

allow multiple -t to increase the test count.  cpus are getting too fast.
ok grunk. with manpage from grunk and jmc

Revision 1.44 / (download) - annotate - [select for diffs], Thu Mar 29 15:20:51 2007 UTC (17 years, 2 months ago) by millert
Branch: MAIN
Changes since 1.43: +14 -8 lines
Diff to previous 1.43 (colored)

Fix a cust & pasto
Correctly compute amount of base64 padding in checklist mode

Revision 1.43 / (download) - annotate - [select for diffs], Thu Mar 29 13:02:17 2007 UTC (17 years, 2 months ago) by millert
Branch: MAIN
Changes since 1.42: +4 -3 lines
Diff to previous 1.42 (colored)

Do not print a warning that no valid checksums were found if there
was a single fingerprint for a file that could not be opened.
The warning that the file could not be opened is sufficient.
From espie@

Revision 1.42 / (download) - annotate - [select for diffs], Wed Mar 28 11:30:15 2007 UTC (17 years, 2 months ago) by millert
Branch: MAIN
Changes since 1.41: +2 -2 lines
Diff to previous 1.41 (colored)

Supress warnings for the first getopt() pass.  Otherwise,
any "unknown option" messages get printed twice.

Revision 1.41 / (download) - annotate - [select for diffs], Tue Mar 27 13:12:41 2007 UTC (17 years, 2 months ago) by millert
Branch: MAIN
Changes since 1.40: +215 -98 lines
Diff to previous 1.40 (colored)

Add base64 support to cksum and friends.  Output encoding can
be set globally or on a per-algorithm basis when using multiple
hash functions.  OK espie@ simon@ deraadt@; man help from jmc@

Revision 1.40 / (download) - annotate - [select for diffs], Tue Mar 20 12:06:48 2007 UTC (17 years, 2 months ago) by thib
Branch: MAIN
Changes since 1.39: +7 -7 lines
Diff to previous 1.39 (colored)

augment the -q option, now if specifed with -c (checklist)
it will only print out the failed cases.

OK millert@

Revision 1.39 / (download) - annotate - [select for diffs], Tue Jan 9 18:06:07 2007 UTC (17 years, 5 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.38: +2 -2 lines
Diff to previous 1.38 (colored)

align usage message correctly

Revision 1.38 / (download) - annotate - [select for diffs], Fri Nov 17 16:02:18 2006 UTC (17 years, 6 months ago) by jmc
Branch: MAIN
Changes since 1.37: +4 -4 lines
Diff to previous 1.37 (colored)

simplify synopsis and usage(); ok millert

Revision 1.37 / (download) - annotate - [select for diffs], Thu Nov 16 23:53:41 2006 UTC (17 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.36: +65 -28 lines
Diff to previous 1.36 (colored)

Add -r and -q options similar to what is supported by FreeBSD's md5
OK deraadt@ ckuethe@

Revision 1.36 / (download) - annotate - [select for diffs], Fri Nov 10 15:03:44 2006 UTC (17 years, 7 months ago) by tom
Branch: MAIN
Changes since 1.35: +3 -3 lines
Diff to previous 1.35 (colored)

Accept upper and lower case letters in a checksum, since this doesn't
alter the value of the digest.  Nor, for that matter, does case affect
the name of the algorithm used.

Partly from Matthew Clarke, clamat (at) telus (dot) net.

ok djm@ millert@

Revision 1.35 / (download) - annotate - [select for diffs], Wed Mar 15 03:15:07 2006 UTC (18 years, 3 months ago) by dhill
Branch: MAIN
CVS Tags: OPENBSD_4_0_BASE, OPENBSD_4_0
Changes since 1.34: +8 -7 lines
Diff to previous 1.34 (colored)

Fix signed/unsigned comparisons by using size_t
Sprinkle some const

ok ray@ jaredy@

Revision 1.34 / (download) - annotate - [select for diffs], Tue Dec 20 02:09:23 2005 UTC (18 years, 5 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.33: +48 -55 lines
Diff to previous 1.33 (colored)

Make "cksum -c" grok checklists generated with cksum, sum and sysvsum.
OK deraadt@

Revision 1.33 / (download) - annotate - [select for diffs], Wed Aug 17 11:34:16 2005 UTC (18 years, 9 months ago) by mpf
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8
Changes since 1.32: +4 -2 lines
Diff to previous 1.32 (colored)

Exit unsuccessfully when comparing against a checklist file fails.
OK markus@ millert@

Revision 1.32 / (download) - annotate - [select for diffs], Wed Dec 29 17:32:44 2004 UTC (19 years, 5 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.31: +168 -112 lines
Diff to previous 1.31 (colored)

Add support for multiple using algorithms.  OK'd by several people
a while ago so get this out of my tree...

Revision 1.31 / (download) - annotate - [select for diffs], Fri Dec 10 19:35:53 2004 UTC (19 years, 6 months ago) by millert
Branch: MAIN
Changes since 1.30: +2 -2 lines
Diff to previous 1.30 (colored)

GNU md5sum uses tab not space to separate filename and hash.  Fixes
parsing of GNU-style checklist files for files with spaces in them.
From Emil Mikulic; closes PR 4027

Revision 1.30 / (download) - annotate - [select for diffs], Tue May 4 18:41:57 2004 UTC (20 years, 1 month ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6
Changes since 1.29: +5 -9 lines
Diff to previous 1.29 (colored)

sync usage w/ man page

Revision 1.29 / (download) - annotate - [select for diffs], Sun May 2 17:53:29 2004 UTC (20 years, 1 month ago) by millert
Branch: MAIN
Changes since 1.28: +160 -46 lines
Diff to previous 1.28 (colored)

Add support for cksum (3 varieties), md4, sha256, sha384, and sha512.
Consequently, cksum moves becomes a link to md5 and moves to /bin.
The cksum man page could use some polishing.

Revision 1.28 / (download) - annotate - [select for diffs], Wed Apr 28 23:58:41 2004 UTC (20 years, 1 month ago) by millert
Branch: MAIN
Changes since 1.27: +13 -13 lines
Diff to previous 1.27 (colored)

Use the FOO_DIGEST_LENGTH macros

Revision 1.27 / (download) - annotate - [select for diffs], Wed Mar 3 22:00:06 2004 UTC (20 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.26: +52 -31 lines
Diff to previous 1.26 (colored)

Extend "md5 -c" to parse the output of GNU md5sum.
Adapted from patches by Lawrence Teo and tedu@.  OK tedu@

Revision 1.26 / (download) - annotate - [select for diffs], Mon Jul 21 00:11:03 2003 UTC (20 years, 10 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.25: +2 -2 lines
Diff to previous 1.25 (colored)

Fix typo: unsigned -> unsigned char; from Thorsten Glaser

Revision 1.25 / (download) - annotate - [select for diffs], Wed Jun 25 21:23:01 2003 UTC (20 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.24: +31 -15 lines
Diff to previous 1.24 (colored)

fix lots of proto issues

Revision 1.24 / (download) - annotate - [select for diffs], Tue Jun 17 21:56:23 2003 UTC (20 years, 11 months ago) by millert
Branch: MAIN
Changes since 1.23: +13 -9 lines
Diff to previous 1.23 (colored)

Sync with share/misc/license.template and add missing DARPA credit
where applicable.

Revision 1.23 / (download) - annotate - [select for diffs], Wed Jun 11 23:42:12 2003 UTC (21 years ago) by deraadt
Branch: MAIN
Changes since 1.22: +3 -2 lines
Diff to previous 1.22 (colored)

ansification, art ok

Revision 1.22 / (download) - annotate - [select for diffs], Tue Jun 3 01:52:39 2003 UTC (21 years ago) by millert
Branch: MAIN
Changes since 1.21: +11 -22 lines
Diff to previous 1.21 (colored)

Use an ISC-tyle license for all my code; it is simpler and more permissive.

Revision 1.21 / (download) - annotate - [select for diffs], Mon Apr 28 19:13:51 2003 UTC (21 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.20: +2 -2 lines
Diff to previous 1.20 (colored)

return from main

Revision 1.20 / (download) - annotate - [select for diffs], Wed Apr 23 16:00:43 2003 UTC (21 years, 1 month ago) by millert
Branch: MAIN
Changes since 1.19: +2 -2 lines
Diff to previous 1.19 (colored)

strchr() should be strrchr(); zyrnix

Revision 1.19 / (download) - annotate - [select for diffs], Sun Mar 23 00:31:23 2003 UTC (21 years, 2 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3
Changes since 1.18: +3 -2 lines
Diff to previous 1.18 (colored)

Do not closed stdin; Andrey Matveev

Revision 1.18 / (download) - annotate - [select for diffs], Thu Mar 13 02:38:22 2003 UTC (21 years, 3 months ago) by millert
Branch: MAIN
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored)

Cast 3 to size_t to shut up stupid gcc on 64bit platforms.

Revision 1.17 / (download) - annotate - [select for diffs], Wed Mar 12 21:29:48 2003 UTC (21 years, 3 months ago) by millert
Branch: MAIN
Changes since 1.16: +165 -36 lines
Diff to previous 1.16 (colored)

Add -c option similar to GNU md5sum.
Original patch from zyrnix but significantly modified by me.
deraadt@ OK

Revision 1.16 / (download) - annotate - [select for diffs], Tue Jan 14 17:15:53 2003 UTC (21 years, 5 months ago) by millert
Branch: MAIN
Changes since 1.15: +7 -1 lines
Diff to previous 1.15 (colored)

Report read() errors; noticed and OK by fgs@

Revision 1.15 / (download) - annotate - [select for diffs], Sun Jan 20 13:32:04 2002 UTC (22 years, 4 months ago) by camield
Branch: MAIN
CVS Tags: OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)

Swap TEST_BLOCK_LEN and TEST_BLOCK_COUNT in benchmark printf.

ok millert@

Revision 1.14 / (download) - annotate - [select for diffs], Thu Sep 6 13:29:08 2001 UTC (22 years, 9 months ago) by mpech
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.13: +1 -2 lines
Diff to previous 1.13 (colored)

o) __progname aria;

millert@ ok.

Revision 1.13 / (download) - annotate - [select for diffs], Sun Jun 3 18:04:16 2001 UTC (23 years ago) by millert
Branch: MAIN
Changes since 1.12: +7 -5 lines
Diff to previous 1.12 (colored)

Nope, that's not right either.  Fix check for mutually exclusive args.

Revision 1.12 / (download) - annotate - [select for diffs], Sun Jun 3 17:02:53 2001 UTC (23 years ago) by espie
Branch: MAIN
Changes since 1.11: +2 -2 lines
Diff to previous 1.11 (colored)

Obvious thinko: command line is wrong if it's too short, not too long.

Revision 1.11 / (download) - annotate - [select for diffs], Sat Jun 2 21:04:53 2001 UTC (23 years ago) by millert
Branch: MAIN
Changes since 1.10: +39 -18 lines
Diff to previous 1.10 (colored)

Fix some typos and add missing test for string of 1 million a's.

Revision 1.10 / (download) - annotate - [select for diffs], Sat Jun 2 20:38:06 2001 UTC (23 years ago) by millert
Branch: MAIN
Changes since 1.9: +198 -193 lines
Diff to previous 1.9 (colored)

New md5/sha1/rmd160 driver with a BSD copyright.  Improvements:
o options that should be mutually exclusive are
o time trial works reasonably when it finishes in < 1 sec
o uses a function table instead of a bunch of globals

Revision 1.9 / (download) - annotate - [select for diffs], Thu Oct 7 16:56:33 1999 UTC (24 years, 8 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9, OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7, OPENBSD_2_6_BASE, OPENBSD_2_6
Changes since 1.8: +10 -9 lines
Diff to previous 1.8 (colored)

One single malloc, with a union to get the largest needed size,
should be enough.

Revision 1.8 / (download) - annotate - [select for diffs], Fri Jan 2 07:04:23 1998 UTC (26 years, 5 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4, OPENBSD_2_3_BASE, OPENBSD_2_3
Changes since 1.7: +37 -18 lines
Diff to previous 1.7 (colored)

use getopt; mph@pobox.com

Revision 1.7 / (download) - annotate - [select for diffs], Fri Aug 1 10:07:11 1997 UTC (26 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_2_BASE, OPENBSD_2_2
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

warn not warnx

Revision 1.6 / (download) - annotate - [select for diffs], Thu Jul 17 05:45:01 1997 UTC (26 years, 11 months ago) by millert
Branch: MAIN
Changes since 1.5: +12 -12 lines
Diff to previous 1.5 (colored)

Adds rmd160 functionality.

Revision 1.5 / (download) - annotate - [select for diffs], Sat Jul 12 21:09:02 1997 UTC (26 years, 11 months ago) by millert
Branch: MAIN
Changes since 1.4: +101 -55 lines
Diff to previous 1.4 (colored)

md5(1) is now capable of doing md4, md5 and sha1 digests.  Currently
only md5 and sha1 are used.

Revision 1.4 / (download) - annotate - [select for diffs], Fri Jun 20 20:35:29 1997 UTC (26 years, 11 months ago) by flipk
Branch: MAIN
Changes since 1.3: +4 -3 lines
Diff to previous 1.3 (colored)

boost TEST_BLOCK_LEN and TEST_BLOCK_COUNT a bit. this makes '-t' more
useful on fast boxes.
also fflush(stdout) after printing the first test message so
the user knows its actually doing something

Revision 1.3 / (download) - annotate - [select for diffs], Sun Nov 24 02:26:00 1996 UTC (27 years, 6 months ago) by niklas
Branch: MAIN
CVS Tags: OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.2: +8 -6 lines
Diff to previous 1.2 (colored)

64-bit cleanup + pedantic -W flags

Revision 1.2 / (download) - annotate - [select for diffs], Tue Nov 12 23:33:02 1996 UTC (27 years, 7 months ago) by niklas
Branch: MAIN
Changes since 1.1: +3 -3 lines
Diff to previous 1.1 (colored)

-Wall happiness

Revision 1.1 / (download) - annotate - [select for diffs], Tue Jun 11 10:37:38 1996 UTC (28 years ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0

move to bin/md5 for `greater accessibility'

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.