Commit Graph

98 Commits

Author SHA1 Message Date
phk
6d87547e6f Remove reference to no longer existing document.
Spotted by:	Bjoern Voigt <bjoern@cs.tu-berlin.de>
2009-01-09 11:45:13 +00:00
phk
94db7634b6 Make the "test" target test the compiled version, instead of the
installed version of the md library.
2008-12-02 19:49:41 +00:00
cperciva
3377b1e9f8 Use unsigned comparisons. Prior to this commit, SHA1_Update and
RIPEMD160_Update were broken when all of the following conditions
applied:
(1) The platform is i386.
(2) The program calling *_Update is statically linked to libmd.
(3) The buffer provided to *_Update is aligned modulo 4 bytes.
(4) The buffer extends beyond 2GB.

Due to the design of this code, SHA1_Update and RIPEMD160_Update will
still be broken if conditions (1)-(3) apply AND the buffer extends
beyond 4GB (i.e., there is an integer overflow in computing "data + len").
Since this remaining bug simply replaces SIGSEGV with a bogus hash (and
non-broken programs should never provide such operands) I don't consider
it to be a serious problem.

MFC After:      1 week
PR:             kern/102795
2007-05-14 05:00:37 +00:00
phk
7a469c93bd 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
ru
928d297eeb -mdoc sweep. 2005-11-17 13:00:00 +00:00
pjd
6a97e501a6 Correct type.
OK'ed by:	cperciva
2005-09-14 10:42:51 +00:00
ru
1a6f8a46aa Removed redundnt empty line.
Approved by:	re (blanket)
2005-06-16 21:53:41 +00:00
ru
7cec114952 Markup fixes.
Approved by:	re
2005-06-16 19:01:07 +00:00
cperciva
180357cd92 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
cperciva
0f8b638e68 The third parameter to SHA_Update and SHA1_Update is a "size_t", not a
"unsigned int".
2005-03-09 16:22:21 +00:00
ru
136924cea4 Expand contractions. 2005-02-15 09:27:00 +00:00
ru
1541af42f1 Expand *n't contractions. 2005-02-13 22:25:33 +00:00
ru
ed72feddcb Sort sections. 2005-01-20 09:17:07 +00:00
ru
57ce50860e Eliminate double whitespace. 2004-07-03 22:30:10 +00:00
bde
fd2c94bc06 Backed out rev.1.6 and subsequent copying of it (bogus addition of
-static to CFLAGS).  It just turned rev.1.5 into an obfuscated no-op.
As explained in the log for rev.1.5, testing should be done in the
host environment but there is a problem in cross-compilation environments.
As not explained in the log for rev.1.6, there was apparently a practical
problem with cross-compiling (makeworld should have set -static in
LDFLAGS but apparently didn't).  Cross-compilation was especially
complicated because the relevant programs are test programs that were
run at beforeinstall time -- dynamic libraries might or might not exist
depending on the build options.  The complications became moot in
rev.1.8 when beforeinstall was renamed "test".
2004-02-26 07:44:37 +00:00
hmp
4426030508 Assorted mdoc(7) fixes:
- fix hard sentence breaks
	- sprinkle a few .Vt's where neccessary
	- remove incorrect use of `\-'
	- proper quoting using .Dq, instead of manual ``...''

Approved by:	des@ (mentor)
Reviewed by:	ru@
2003-10-09 23:06:06 +00:00
obrien
372364ee0f style.Makefile(5) 2003-08-18 15:25:39 +00:00
gordon
5901302929 Stage 3 of dynamic root support. Make all the libraries needed to run
binaries in /bin and /sbin installed in /lib. Only the versioned files
reside in /lib, the .so symlink continues to live /usr/lib so the
toolchain doesn't need to be modified.
2003-08-17 08:28:46 +00:00
markm
f4bde254d7 Rename local variables to not mask global names of same name. This
fixes lots of lint(1) warnings.
2003-06-05 13:17:32 +00:00
charnier
f0ffe0ef9f The .Fn function 2003-03-24 16:02:05 +00:00
peter
a51c9b6627 Initiate deorbit burn for the i386-only a.out related support. Moves are
under way to move the remnants of the a.out toolchain to ports.  As the
comment in src/Makefile said, this stuff is deprecated and one should not
expect this to remain beyond 4.0-REL.  It has already lasted WAY beyond
that.

Notable exceptions:
gcc - I have not touched the a.out generation stuff there.
ldd/ldconfig - still have some code to interface with a.out rtld.
old as/ld/etc - I have not removed these yet, pending their move to ports.
some includes - necessary for ldd/ldconfig for now.

Tested on: i386 (extensively), alpha
2002-09-17 01:49:00 +00:00
phk
3a164c2a89 Get this file closer to style(9). 2002-09-08 15:10:04 +00:00
bmah
5419354c9f Fix a bug where calling MD5File(3) with a zero-length file generated an
error, due to an uninitialized variable.

Reviewed by:	phk, archie
2002-09-06 19:51:58 +00:00
mux
19361eefdf Add missing const's. 2002-06-24 13:52:26 +00:00
phk
5f785ab6dd Improve the handling of Encode and Decode operations in MD5.
Use memcpy for all little-endian architectures, sys/kern/md5c.c indicates
this should be safe for all currently supported LE archs.

Change the Encode and Decode functions for other archs to use le32toh()
and htole32() functions instead of explicit byte shuffling.

On sparc64 this gives md5(1) about 8% speed increase.
2002-06-22 12:54:11 +00:00
ru
76ecabcdaf Don't build manuals at inappropriate time.
Collapse generation of md[245].3 manpages.
2002-04-10 17:01:55 +00:00
phk
18a4c2c111 Modernize my email address. 2002-03-25 14:12:49 +00:00
phk
811d04c86c Modernize my email address. 2002-03-25 13:52:45 +00:00
obrien
fd9d7ac0ed Remove __P() usage. 2002-03-21 23:54:04 +00:00
obrien
084b4588f2 Remove 'register' keyword. 2002-03-21 23:39:28 +00:00
ru
623da62a5a mdoc(7) police: Use the new .In macro for #include statements. 2001-10-01 16:09:29 +00:00
dillon
ed504fcccb add __FBSDID()s to libmd 2001-09-30 21:56:22 +00:00
ru
4345758876 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
dd
a145482cf6 Remove whitespace at EOL. 2001-07-15 07:53:42 +00:00
ru
317b7d8e37 mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 13:41:46 +00:00
ru
091222e6af mdoc(7) police: use proper markup for function arguments. 2001-04-04 10:23:27 +00:00
ru
25ef23ac1c MAN[1-9] -> MAN. 2001-03-27 17:27:19 +00:00
phk
cf0fcea2b7 Add a new entrypoint to the hashes in libmd:
char *
  FooFileChunk(const char *filename, char *buf, off_t offset, off_t length)
Which only hashes part of a file.
Implement FooFile() in terms of this function.

Submitted by:	roam
2001-03-17 10:00:50 +00:00
ru
c23c39b3a4 mdoc(7) police: removed history info from the .Os FreeBSD call. 2000-12-14 11:52:05 +00:00
phantom
98949b1e90 Introduce .Lb macro to libmd manpages 2000-04-22 16:11:30 +00:00
rgrimes
c127d0e61e Replace beforeinstall target with new variables used by .mk system.
Reviewed by:	marcel, and make world
2000-01-14 07:57:47 +00:00
peter
d53e4c1d80 Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"
is an application space macro and the applications are supposed to be free
to use it as they please (but cannot).  This is consistant with the other
BSD's who made this change quite some time ago.  More commits to come.
1999-12-29 05:07:58 +00:00
peter
76f0c923fe $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
ache
4e5c23f7a1 add more MLINKS 1999-03-02 22:53:24 +00:00
wollman
e903dee1c1 Don't even attempt to build the assembly-language versions of RIPEMD160
and SHA-1 when OBJFORMAT is not ELF.  Add a warning to the man page
about how SHA-1 uses bswapl, which will trap on 80386es (and the kernel
should, but doesn't currently, emulate).
1999-03-01 02:39:45 +00:00
chuckr
cd8e257052 fix for incorrect specification of alignment (it worked for the elf
build, but broke while doing the aout legacy build).  Now using
.p2align instead of .align.  Fixes broken buildworld.

Submitted by:	John Polstra
Reviewed by:	John Polstra
1999-02-28 18:55:39 +00:00
mjacob
39fab177a1 No, this isn't what I submitted. Seems like the patch I sent
was ignored and an incorrect hand edit was used instead.
1999-02-27 02:45:31 +00:00
wollman
7810a0ea5a Fixes for Alpha.
Submitted by:	mjacob
1999-02-26 20:06:46 +00:00
wollman
563552afce Don't build the assembly for shared linkage, PIC isn't implemented. 1999-02-26 18:43:01 +00:00
wollman
db4b7a727b Add Eric Young's RIPEMD160 implementation as well, in case SHA-1
should prove weak.  Also fix a few problems with the SHA-1 build.
1999-02-26 18:41:47 +00:00