Eitan Adler
aa677d07a1
md5: perform compare case-insenstive
...
md5 generates a md5 hash lowercase, but it might be provided in
uppercase. Allow this.
PR: 205598
Reported by: ohauer
MFC After: 2 weeks
2018-05-23 11:45:46 +00:00
Bryan Drewery
ea825d0274
DIRDEPS_BUILD: Update dependencies.
...
Sponsored by: Dell EMC Isilon
2017-10-31 00:07:04 +00:00
Dag-Erling Smørgrav
8d26f08e05
Fix date.
...
Reported by: delphij, mckay
MFC with: r314528
2017-03-02 14:50:01 +00:00
Dag-Erling Smørgrav
c74cccf0f8
Update to reflect that SHA-1 has now been broken.
...
Submitted by: ak
MFC after: 1 week
2017-03-02 00:27:21 +00:00
Allan Jude
40d3e536c5
Add skein(3) front ends to the md5 manpage
...
Reported by: emaste
2017-01-07 19:43:40 +00:00
Bryan Drewery
490a8aa9a1
DIRDEPS_BUILD: Update dependencies.
...
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
2016-11-13 00:11:30 +00:00
Ed Maste
2c81811986
md5: enter capability on last fd or when acting as a filter
...
Reviewed by: allanjude, cem
MFC after: 2 months
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8271
2016-10-19 21:07:17 +00:00
Allan Jude
b468a9ff1d
Import the skein hashing algorithm, based on the threefish block cipher
...
Connect it to userland (libmd, libcrypt, sbin/md5) and kernel (crypto.ko)
Support for skein as a ZFS checksum algorithm was introduced in r289422
but is disconnected because FreeBSD lacked a Skein implementation.
A further commit will enable it in ZFS.
Reviewed by: cem
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D6166
2016-05-29 01:15:36 +00:00
Allan Jude
1780e40715
Implement SHA-512 truncated (224 and 256 bits)
...
This implements SHA-512/256, which generates a 256 bit hash by
calculating the SHA-512 then truncating the result. A different initial
value is used, making the result different from the first 256 bits of
the SHA-512 of the same input. SHA-512 is ~50% faster than SHA-256 on
64bit platforms, so the result is a faster 256 bit hash.
The main goal of this implementation is to enable support for this
faster hashing algorithm in ZFS. The feature was introduced into ZFS
in r289422, but is disconnected because SHA-512/256 support was missing.
A further commit will enable it in ZFS.
This is the follow on to r292782
Reviewed by: cem
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D6061
2016-05-28 16:06:07 +00:00
Glen Barber
406d87b1c3
Explicitly add more files to the 'runtime' package.
...
Sponsored by: The FreeBSD Foundation
2016-02-09 20:19:31 +00:00
Allan Jude
7a3f5d11fb
Replace sys/crypto/sha2/sha2.c with lib/libmd/sha512c.c
...
cperciva's libmd implementation is 5-30% faster
The same was done for SHA256 previously in r263218
cperciva's implementation was lacking SHA-384 which I implemented, validated against OpenSSL and the NIST documentation
Extend sbin/md5 to create sha384(1)
Chase dependancies on sys/crypto/sha2/sha2.{c,h} and replace them with sha512{c.c,.h}
Reviewed by: cperciva, des, delphij
Approved by: secteam, bapt (mentor)
MFC after: 2 weeks
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D3929
2015-12-27 17:33:59 +00:00
Simon J. Gerraty
ccfb965433
Add META_MODE support.
...
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.
Still need to add real targets under targets/ to build packages.
Differential Revision: D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
Simon J. Gerraty
44d314f704
dirdeps.mk now sets DEP_RELDIR
2015-06-08 23:35:17 +00:00
Simon J. Gerraty
98e0ffaefb
Merge sync of head
2015-05-27 01:19:58 +00:00
Xin LI
a2f9ce8a69
Constify.
...
Suggested by: rdivacky
MFC after: 2 weeks
2015-03-31 19:12:13 +00:00
Xin LI
11500c4eaa
Fix remaining warnings.
...
MFC after: 2 weeks
2015-03-27 18:23:06 +00:00
Xin LI
16945d8950
- Correct type for checkAgainst.
...
- Staticify flags that are not used outside the file scope.
PR: bin/193471
Submitted by: Robert Sprowson <webpages sprow.co.uk>
MFC after: 2 weeks
2015-03-26 22:34:27 +00:00
Baptiste Daroussin
13eb765f2d
Convert sbin/ to LIBADD
...
Reduce overlinking
2014-11-25 11:23:12 +00:00
Simon J. Gerraty
ee7b0571c2
Merge head from 7/28
2014-08-19 06:50:54 +00:00
Baptiste Daroussin
bd0891ceb3
use .Mt to mark up email addresses consistently (part1)
...
PR: 191174
Submitted by: Franco Fichtner <franco@lastsummer.de>
2014-06-20 09:40:43 +00:00
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
Simon J. Gerraty
fae50821ae
Updated dependencies
2014-05-16 14:09:51 +00:00
Simon J. Gerraty
76b28ad6ab
Updated dependencies
2014-05-10 05:16:28 +00:00
Simon J. Gerraty
d1d0158641
Merge from head
2013-09-05 20:18: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
Simon J. Gerraty
7cf3a1c6b2
Updated dependencies
2013-03-11 17:21:52 +00:00
Simon J. Gerraty
f5f7c05209
Updated dependencies
2013-02-16 01:23:54 +00:00
Simon J. Gerraty
23090366f7
Sync from head
2012-11-04 02:52:03 +00:00
Marcel Moolenaar
7750ad47a9
Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
...
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +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
Bill Fumerola
b76bf6fc36
Since we are using strlen() let's assign it to the correct type and
...
include the proper header.
1999-07-21 00:51:14 +00:00
Kris Kennaway
93606d6ebb
Fixes for -t option:
...
* Don't buffer "Digesting..." output - flush it immediately.
* Increase the number of repetitions by a factor of 100, and the block size by
a factor of 10 so as to give meaningful results on modern machines (108
seconds on my P120, and ~26 seconds on a P-II 350).
PR: bin/10604
Submitted by: Stanislav Shalunov <shalunov@lynxhub.lz.att.com>
1999-05-01 14:54:21 +00:00
Philippe Charnier
23b5892f5e
Correct use of .Nm. Spelling. Add rcsid, remove unused #includes, use err(3).
1998-07-06 07:04:50 +00:00
Steve Price
9a9791af6e
Fix a few style nits from previous commit.
...
Submitted by: Bruce Evans <bde@zeta.org.au>
1997-12-29 14:05:49 +00:00
Steve Price
716847a669
Get md5(1) to use getopt(3). Also some minor -Wall cleaning
...
while here.
PR: 5387
Submitted by: Matthew Hunt <mph@pobox.com>
1997-12-29 03:40:37 +00:00
Poul-Henning Kamp
0d150bcf0b
Fix bad assumptions about types.
...
PR: 1649
Reviewed by: phk
Submitted by: Jason Thorpe <thorpej@nas.nasa.gov>
1997-09-18 18:19:45 +00:00
John-Mark Gurney
46657c7e77
fix a few spelling changes
...
Submitted by: Josh Gilliam
Closes PR's: 4429, 4431-4438
PS: He has agreed to submit all contrib fixes back to the original author.
1997-08-30 12:22:49 +00:00
John-Mark Gurney
f22592e760
mdoc'ify man page
1997-03-02 21:43:10 +00:00
Peter Wemm
c0ec1f37ef
Revert $FreeBSD$ to $Id$
1997-02-22 14:40:44 +00:00
Wolfram Schneider
00f1123353
/usr/lib/libmd.a -> ${LIBMD}
1997-02-08 23:24:10 +00:00
Poul-Henning Kamp
1d0847d38d
Trivial fix for braino.
...
Reviewed by: phk
Submitted by: Martin Ibert <mib@ppe.bb-data.de>
1997-01-16 10:12:30 +00:00
Jordan K. Hubbard
1130b656e5
Make the long-awaited change from $Id$ to $FreeBSD$
...
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Bruce Evans
1ab6205ce1
Moved #include of <sys/types.h> earlier so that this compiles when
...
<stdio.h> doesn't (bogusly) include <sys/types.h>.
Cleaned up #includes.
1996-10-25 06:48:29 +00:00
Poul-Henning Kamp
116805fd7a
Fix to match new API. Fixes memory leak, faster.
1995-07-12 09:14:46 +00:00
Rodney W. Grimes
5ebc7e6281
Remove trailing whitespace.
1995-05-30 06:12:45 +00:00
Poul-Henning Kamp
c8006b1500
oops.
1995-02-26 02:00:35 +00:00
Poul-Henning Kamp
23b406e176
Add a '-p' option to md5. This will save some time in generation of the
...
ctm deltas.
1995-02-26 01:55:31 +00:00
Poul-Henning Kamp
9b1fd0e50e
Clean this file up so it is readable...
1995-02-20 00:48:50 +00:00
Andreas Schulz
a8fcd7af26
Changed a sum(1) to a cksum(1).
1994-12-11 23:29:20 +00:00
Paul Traina
e164509318
Incorproate version of md5 placed into public domain by RSA.
1994-10-29 23:58:02 +00:00