History log of /freebsd-9.3-release/lib/libmd/
Revision Date Author Comments
267654 20-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


225736 23-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


223582 27-Jun-2011 cperciva

Rewrite HISTORY: The SHA256 code first appeared in 6.0, and the SHA512
code in 9.0; neither existed in FreeBSD 4.0.


220496 09-Apr-2011 markm

Add SHA512 (Actually, this is Colin Percival's code for SHA256, with
relevant constants changed).

While I'm here clean up the tests and Makefile.

PR: misc/124164
Submitted by: KIMURA Yasuhiro < yasu utahime org >
MFC after: 1 month


218723 15-Feb-2011 dim

Fix some leftover binaries and shared libraries in the system that still
have an executable stack, due to linking in hand-assembled .S or .s
files, that have no .GNU-stack sections:

RWX --- --- /lib/libcrypto.so.6
RWX --- --- /lib/libmd.so.5
RWX --- --- /lib/libz.so.6
RWX --- --- /lib/libzpool.so.2
RWX --- --- /usr/lib/liblzma.so.5

These were found using scanelf, from the sysutils/pax-utils port.

Reviewed by: kib


201381 02-Jan-2010 ed

Build lib/ with WARNS=6 by default.

Similar to libexec/, do the same with lib/. Make WARNS=6 the norm and
lower it when needed.

I'm setting WARNS?=0 for secure/. It seems secure/ includes the
Makefile.inc provided by lib/. I'm not going to touch that directory.
Most of the code there is contributed anyway.


186941 09-Jan-2009 phk

Remove reference to no longer existing document.

Spotted by: Bjoern Voigt <bjoern@cs.tu-berlin.de>


185568 02-Dec-2008 phk

Make the "test" target test the compiled version, instead of the
installed version of the md library.


169547 14-May-2007 cperciva

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


154479 17-Jan-2006 phk

Fix an 11 year old mistake: Let the hash functions take a void* instead
of unsigned char* argument.


152551 17-Nov-2005 ru

-mdoc sweep.


150125 14-Sep-2005 pjd

Correct type.

OK'ed by: cperciva


147444 16-Jun-2005 ru

Removed redundnt empty line.

Approved by: re (blanket)


147434 16-Jun-2005 ru

Markup fixes.

Approved by: re


143334 09-Mar-2005 cperciva

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


143326 09-Mar-2005 cperciva

The third parameter to SHA_Update and SHA1_Update is a "size_t", not a
"unsigned int".


141946 15-Feb-2005 ru

Expand contractions.


141846 13-Feb-2005 ru

Expand *n't contractions.


140505 20-Jan-2005 ru

Sort sections.


131539 03-Jul-2004 ru

Eliminate double whitespace.


126267 26-Feb-2004 bde

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".


120957 09-Oct-2003 hmp

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@


119071 18-Aug-2003 obrien

style.Makefile(5)


119017 17-Aug-2003 gordon

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.


115872 05-Jun-2003 markm

Rename local variables to not mask global names of same name. This
fixes lots of lint(1) warnings.


112541 24-Mar-2003 charnier

The .Fn function


103436 17-Sep-2002 peter

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


103098 08-Sep-2002 phk

Get this file closer to style(9).


103038 06-Sep-2002 bmah

Fix a bug where calling MD5File(3) with a zero-length file generated an
error, due to an uninitialized variable.

Reviewed by: phk, archie


98753 24-Jun-2002 mux

Add missing const's.


98615 22-Jun-2002 phk

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.


94367 10-Apr-2002 ru

Don't build manuals at inappropriate time.
Collapse generation of md[245].3 manpages.


93151 25-Mar-2002 phk

Modernize my email address.


93149 25-Mar-2002 phk

Modernize my email address.


92917 21-Mar-2002 obrien

Remove __P() usage.


92913 21-Mar-2002 obrien

Remove 'register' keyword.


84306 01-Oct-2001 ru

mdoc(7) police: Use the new .In macro for #include statements.


84211 30-Sep-2001 dillon

add __FBSDID()s to libmd


81251 07-Aug-2001 ru

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.


79754 15-Jul-2001 dd

Remove whitespace at EOL.


79531 10-Jul-2001 ru

mdoc(7) police: removed HISTORY info from the .Os call.


75161 04-Apr-2001 ru

mdoc(7) police: use proper markup for function arguments.


74870 27-Mar-2001 ru

MAN[1-9] -> MAN.


74385 17-Mar-2001 phk

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


70015 14-Dec-2000 ru

mdoc(7) police: removed history info from the .Os FreeBSD call.


59512 22-Apr-2000 phantom

Introduce .Lb macro to libmd manpages


55955 14-Jan-2000 rgrimes

Replace beforeinstall target with new variables used by .mk system.

Reviewed by: marcel, and make world


55206 29-Dec-1999 peter

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.


50476 28-Aug-1999 peter

$Id$ -> $FreeBSD$


44437 02-Mar-1999 ache

add more MLINKS


44356 01-Mar-1999 wollman

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).


44332 28-Feb-1999 chuckr

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


44310 27-Feb-1999 mjacob

No, this isn't what I submitted. Seems like the patch I sent
was ignored and an incorrect hand edit was used instead.


44304 26-Feb-1999 wollman

Fixes for Alpha.

Submitted by: mjacob


44302 26-Feb-1999 wollman

Don't build the assembly for shared linkage, PIC isn't implemented.


44301 26-Feb-1999 wollman

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.


44290 26-Feb-1999 wollman

Fix bug in MDx test suite.
Add Eric Young's SHA-[01] implementations.


43911 11-Feb-1999 wollman

Add a note about the insecurity of MD4 and potential vulnerability of
MD5 to similar attacks.


41106 12-Nov-1998 jdp

Build libmd shared for a.out too. Required for some PAM modules.


39063 11-Sep-1998 imp

$@ -> ${.TARGET}


38632 30-Aug-1998 jb

BINFORMAT -> OBJFORMAT ready for E-day.


34909 27-Mar-1998 phk

Split the padding out into a separate function.
Synchronize the kernel and libmd versions of md5c.c

PR: misc/6127
Reviewed by: phk
Submitted by: Ari Suutari <ari@suutari.iki.fi>


34685 19-Mar-1998 bde

Don't use the beforedepend target. It was a no-op here except for
helping bsd.dep.mk break `make -jN depend'.


34669 19-Mar-1998 charnier

.Sh AUTHOR -> .Sh AUTHORS. Use .An/.Aq


29142 05-Sep-1997 peter

If not building a.out, still build a pic version of libmd. This allows
things like libskey.so to be dynamically self contained.

Things like md5(1) where speed is critical should still link with libmd.a,
but for things like login, where it's a once-off call if skey is used, it's
not worth the hassle.


28688 25-Aug-1997 joerg

Make the MD* header files C++-aware. Also, string arguments are supposed
to be of type `const char *'.

PR: 3291
Submitted by: dima@tejblum.dnttm.rssi.ru (Dmitrij Tejblum)


24008 19-Mar-1997 bde

FIxed arg types (mostly missing consts) in synopsis.


22993 22-Feb-1997 peter

Revert $FreeBSD$ to $Id$


21673 14-Jan-1997 jkh

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.


20787 22-Dec-1996 phk

Just pick up the real thing from <sys/md5.h>


20785 22-Dec-1996 phk

Make this compile in the kernel too, major cosmetic cleanup.


19168 25-Oct-1996 bde

Moved #include of <sys/types.h> earlier so that this compiles when
<stdio.h> doesn't (bogusly) include <sys/types.h>.

Cleaned up #includes.


19100 22-Oct-1996 phk

Add #include <sys/types>


19099 22-Oct-1996 phk

close bin/1648 libmd not 64bit safe.

if something fails to compile now, you need to add #include <sys/types.h>

Partially Submitted by: Jason Thorpe <thorpej@nas.nasa.gov>


18845 09-Oct-1996 wollman

Use -mdoc macros properly.
Translate from Danglish into English.
Refer to the alogrithms as ``RSA Data Security MDX message digest'' as
required by the license.


17931 30-Aug-1996 peter

cmp -s || install -c ==> install -C, use a .for loop


17798 23-Aug-1996 mpp

Some minor man page cleanup.


17271 24-Jul-1996 phk

Fix a memory leak in MD[245]End()

Submitted by: Ikuo Nakagawa <ikuo@isl.intec.co.jp>
PR: misc/1424


15963 28-May-1996 jdp

Correct two errors in the manual page.


14007 09-Feb-1996 phk

Don't install mdX.3, it's the template used to build the other pages.


14005 09-Feb-1996 phk

Bill was a little to fast here...


14003 09-Feb-1996 mpp

Add some missing MLINKS, correct some cross references, correct some
file locations and some minor formatting/style problems.


13987 09-Feb-1996 mpp

Added some missing MLINKS for section 3 man pages.
Also corrected a few minor formatting errors, file location and cross
references in some of the section 3 man pages.

This shuts up a lot of the output from "manck" for section 3.


12762 11-Dec-1995 peter

Add a structure definition to the MD* Contexts, so that cvs can use
the standard libmd version of MD5 instead of it's own seperate copy..


10591 06-Sep-1995 dg

Back out that last change; we don't build this shared.


10590 06-Sep-1995 dg

Bumped shared lib rev to 2.1.


9970 06-Aug-1995 bde

Change `install' to `${INSTALL}' so that default install flags can be
specified in the top level Makefiles.

Previously I missed dozens of Makefiles that skip the install after
using `cmp -s' to decide that the install isn't necessary.


9488 12-Jul-1995 phk

Change this to do what it should have done from the start.
Add argument for buffer for output.
Fix manuals.


8870 30-May-1995 rgrimes

Remove trailing whitespace.


8103 27-Apr-1995 wollman

No sense in copying the hex[] array in each call to MDXEnd(), it's a
constant. (There probably ought to be a single libc version of it.)


6684 24-Feb-1995 phk

Clean a bunch of -Wall warnings.


6596 21-Feb-1995 phk

Speed md5 up around 30% by shorting out a couple of cumbersome
memcpy equivalent functions.


5820 24-Jan-1995 jkh

Eliminate a bogus tab.


4245 07-Nov-1994 phk

Added "const" to the arguments here and there.


4043 01-Nov-1994 pst

Clean up beforeinstall


2882 19-Sep-1994 phk

Added beforeinstall rule to install .h files. We might need some .mk
support for this kind of thing. Look at src/Makefile target "includes".


2848 18-Sep-1994 phk

libmd no longer built as shared-lib, only static.
Renamed the beforeinstall to test.


2577 08-Sep-1994 bde

Build *.3 and *.ref at build time, not at install time.


2487 04-Sep-1994 jkh

Make mddriver static.
Submitted by: jkh


2368 28-Aug-1994 bde

Use ${LDFLAGS} instead of static for compiling binaries. Neither is
sufficient for cross compiling but it's best to test with the flags
normally used.

Use ${ECHO} instead of `echo' so that `make -s' is fairly quiet.


2274 25-Aug-1994 paul

Added ${.CURDIRb to vuilding of man pages so it works with obj

Submitted by: Paul Richards


1964 08-Aug-1994 jkh

Boy, was *this* ever bollixed!

1. Copyright files looked for in the wrong place

2. cmp was looking in wrong place for test data.

3. Driver for test not linked static, thus dynamic resolution of library
not working.

4. Man page installation not consistent with source.

Reviewed by:
Submitted by: jkh


1846 04-Aug-1994 wollman

Make obj directory work right. md?hl.c should probably be
deleted, but I'll leave that up to PHK.


1803 24-Jul-1994 phk

This commit was generated by cvs2svn to compensate for changes in r1802,
which included commits to RCS files with non-trunk default branches.