History log of /freebsd-current/lib/libmd/mdXhl.c
Revision Date Author Comments
# a2f733ab 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

lib: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by: Netflix


# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 25316863 23-May-2018 Mark Johnston <markj@FreeBSD.org>

Revert r334090.

It causes the 32bit compat build of libmd to fail with:

libmd/rmd160c.c:86:9: error: 'ripemd160_block' macro redefined
#define ripemd160_block ripemd160_block_x86
^
libmd/ripemd.h:122:9: note: previous definition is here
#define ripemd160_block _libmd_ripemd160_block


# 272b99f7 23-May-2018 Eitan Adler <eadler@FreeBSD.org>

libmd: build with WARNS=1

- build with WARNS=1. This works without any changes
- remove two unused variables noticed at WARNS=2


# ee9f155f 17-Apr-2018 Conrad Meyer <cem@FreeBSD.org>

libmd: Remove trailing whitespace from mdXhl.c

No functional change.

Reported by: me, in a CR from three years ago today
Sponsored by: Dell EMC Isilon


# 62cf53fd 13-Dec-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

SPDX: some uses of the RSA-MD license.


# de13c242 17-Oct-2016 Ed Maste <emaste@FreeBSD.org>

libmd: introduce functions that operate on an fd instead of filename

Reviewed by: allanjude, cem
MFC after: 2 months
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8264


# 492e9ee5 14-Jan-2016 Jonathan T. Looney <jtl@FreeBSD.org>

Improvements to the MDXFileChunk() template function:
- Remove unneeded fstat()/lseek() calls.
- Return NULL and set errno to EINVAL on negative length.
- Fix small style problems and expand variable names.

After this change, it is possible to use this code for some irregular
files. For example, 'md5 /dev/md0' should now succeed.

Differential Revision: https://reviews.freebsd.org/D4748
Suggested by: bde
Reviewed by: bde, allanjude, delphij


# 8d03d93f 30-Dec-2015 Jonathan T. Looney <jtl@FreeBSD.org>

Fix a file descriptor leak in mdXhl.c (which is used by numerous hashing
algorithms.

CID: 1305669,1305611,1305663,1305603,1305584,1305639,1346865,1305601
Differential Revision: https://reviews.freebsd.org/D4732
Reviewed by: allanjude, delphij
MFC after: 2 weeks
Sponsored by: Juniper Networks


# 7b7254e7 09-Jul-2015 John-Mark Gurney <jmg@FreeBSD.org>

increase buffer size to significantly increase performance...

see:
https://docs.freebsd.org/cgi/mid.cgi?20150513080342.GE37063@funkthat.com

for benchmarks...


# 2dd0a89c 11-May-2015 Thomas Quinot <thomas@FreeBSD.org>

Unbreak MIPS build following rev. 282726

Introduce further adjustments to the renaming of libmd
symbols: make sure that we do not generate dangling weak
aliases, as this causes build failures on MIPS.

Tested by: sbruno


# 9d8b6686 10-May-2015 Thomas Quinot <thomas@FreeBSD.org>

Ensure libmd symbols do not clash with libcrypto

Add a prefix to all symbols in libmd to avoid incompatibilites
with same-named, but not binary compatible, symbols from libcrypto.

Also introduce Weak aliases to avoid the need to rebuild dependent
binaries and a major version bump.

PR: 199119
Differential Revision: D2216
Reviewed by: roberto, delphij
MFC after: 2 weeks


# 6eec0f2b 24-Apr-2015 Enji Cooper <ngie@FreeBSD.org>

Avoid an infinite loop by ensuring that the amount of bytes read is greater
than 0 in MDXFileChunk when calculating the checksum

This edgecase can be triggered if the file is truncated while the checksum
is being calculated (i.e. the EOF is reached)

Differential Revision: https://reviews.freebsd.org/D2351 (patch by darius)
PR: 196694
Reviewed by: delphij, ngie
Submitted by: Daniel O'Connor <darius@dons.net.au>
Sponsored by: EMC / Isilon Storage Division


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 25a14196 17-Jan-2006 Poul-Henning Kamp <phk@FreeBSD.org>

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


# c64685aa 08-Sep-2002 Poul-Henning Kamp <phk@FreeBSD.org>

Get this file closer to style(9).


# 2ca72005 06-Sep-2002 Bruce A. Mah <bmah@FreeBSD.org>

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

Reviewed by: phk, archie


# aaead0df 25-Mar-2002 Poul-Henning Kamp <phk@FreeBSD.org>

Modernize my email address.


# 5d946b40 30-Sep-2001 Matthew Dillon <dillon@FreeBSD.org>

add __FBSDID()s to libmd


# 8a24546c 17-Mar-2001 Poul-Henning Kamp <phk@FreeBSD.org>

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


# 7f3dea24 27-Aug-1999 Peter Wemm <peter@FreeBSD.org>

$Id$ -> $FreeBSD$


# c177a86b 25-Feb-1999 Garrett Wollman <wollman@FreeBSD.org>

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


# f7787644 24-Aug-1997 Joerg Wunsch <joerg@FreeBSD.org>

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)


# 7e546392 22-Feb-1997 Peter Wemm <peter@FreeBSD.org>

Revert $FreeBSD$ to $Id$


# 1130b656 14-Jan-1997 Jordan K. Hubbard <jkh@FreeBSD.org>

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.


# 1ab6205c 25-Oct-1996 Bruce Evans <bde@FreeBSD.org>

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

Cleaned up #includes.


# 8bc66d9b 24-Jul-1996 Poul-Henning Kamp <phk@FreeBSD.org>

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

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


# 05f65b29 12-Jul-1995 Poul-Henning Kamp <phk@FreeBSD.org>

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


# 6c06b4e2 29-May-1995 Rodney W. Grimes <rgrimes@FreeBSD.org>

Remove trailing whitespace.


# 003d2998 27-Apr-1995 Garrett Wollman <wollman@FreeBSD.org>

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


# 6c20486d 24-Feb-1995 Poul-Henning Kamp <phk@FreeBSD.org>

Clean a bunch of -Wall warnings.


# 4385de16 07-Nov-1994 Poul-Henning Kamp <phk@FreeBSD.org>

Added "const" to the arguments here and there.


# c9502b53 23-Jul-1994 Poul-Henning Kamp <phk@FreeBSD.org>

Reviewed by: phk
Imported libmd. This library contains MD2, MD4 and MD5.
These three boggers pop up all over the place all of the time, so I
decided we needed a library with them. In general they are used for
security checks, so if you use them you want to link them static.