summaryrefslogtreecommitdiff
path: root/lib/libmd/mdXhl.c
Commit message (Collapse)AuthorAgeFilesLines
* Revert r334090.Mark Johnston2018-05-231-1/+2
| | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=334105
* libmd: build with WARNS=1Eitan Adler2018-05-231-2/+1
| | | | | | | | - build with WARNS=1. This works without any changes - remove two unused variables noticed at WARNS=2 Notes: svn path=/head/; revision=334090
* libmd: Remove trailing whitespace from mdXhl.cConrad Meyer2018-04-171-2/+2
| | | | | | | | | | No functional change. Reported by: me, in a CR from three years ago today Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=332655
* SPDX: some uses of the RSA-MD license.Pedro F. Giffuni2017-12-131-1/+3
| | | | Notes: svn path=/head/; revision=326828
* libmd: introduce functions that operate on an fd instead of filenameEd Maste2016-10-171-10/+26
| | | | | | | | | | Reviewed by: allanjude, cem MFC after: 2 months Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8264 Notes: svn path=/head/; revision=307521
* Improvements to the MDXFileChunk() template function:Jonathan T. Looney2016-01-141-29/+31
| | | | | | | | | | | | | | | | - 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 Notes: svn path=/head/; revision=294037
* Fix a file descriptor leak in mdXhl.c (which is used by numerous hashingJonathan T. Looney2015-12-301-4/+9
| | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=292955
* increase buffer size to significantly increase performance...John-Mark Gurney2015-07-091-1/+1
| | | | | | | | | | see: https://docs.freebsd.org/cgi/mid.cgi?20150513080342.GE37063@funkthat.com for benchmarks... Notes: svn path=/head/; revision=285324
* Unbreak MIPS build following rev. 282726Thomas Quinot2015-05-111-0/+6
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=282774
* Ensure libmd symbols do not clash with libcryptoThomas Quinot2015-05-101-0/+9
| | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=282726
* Avoid an infinite loop by ensuring that the amount of bytes read is greaterEnji Cooper2015-04-241-1/+1
| | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=281928
* Fix an 11 year old mistake: Let the hash functions take a void* insteadPoul-Henning Kamp2006-01-171-1/+1
| | | | | | | of unsigned char* argument. Notes: svn path=/head/; revision=154479
* Get this file closer to style(9).Poul-Henning Kamp2002-09-081-51/+55
| | | | Notes: svn path=/head/; revision=103098
* Fix a bug where calling MD5File(3) with a zero-length file generated anBruce A. Mah2002-09-061-0/+1
| | | | | | | | | error, due to an uninitialized variable. Reviewed by: phk, archie Notes: svn path=/head/; revision=103038
* Modernize my email address.Poul-Henning Kamp2002-03-251-1/+1
| | | | Notes: svn path=/head/; revision=93149
* add __FBSDID()s to libmdMatthew Dillon2001-09-301-3/+3
| | | | Notes: svn path=/head/; revision=84211
* Add a new entrypoint to the hashes in libmd:Poul-Henning Kamp2001-03-171-7/+29
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=74385
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50476
* Fix bug in MDx test suite.Garrett Wollman1999-02-261-6/+6
| | | | | | | Add Eric Young's SHA-[01] implementations. Notes: svn path=/head/; revision=44290
* Make the MD* header files C++-aware. Also, string arguments are supposedJoerg Wunsch1997-08-251-2/+2
| | | | | | | | | | to be of type `const char *'. PR: 3291 Submitted by: dima@tejblum.dnttm.rssi.ru (Dmitrij Tejblum) Notes: svn path=/head/; revision=28688
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-221-1/+1
| | | | Notes: svn path=/head/; revision=22993
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=21673
* Moved #include of <sys/types.h> earlier so that this compiles whenBruce Evans1996-10-251-7/+8
| | | | | | | | | <stdio.h> doesn't (bogusly) include <sys/types.h>. Cleaned up #includes. Notes: svn path=/head/; revision=19168
* Fix a memory leak in MD[245]End()Poul-Henning Kamp1996-07-241-9/+8
| | | | | | | | Submitted by: Ikuo Nakagawa <ikuo@isl.intec.co.jp> PR: misc/1424 Notes: svn path=/head/; revision=17271
* Change this to do what it should have done from the start.Poul-Henning Kamp1995-07-121-11/+14
| | | | | | | | Add argument for buffer for output. Fix manuals. Notes: svn path=/head/; revision=9488
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-2/+2
| | | | Notes: svn path=/head/; revision=8870
* No sense in copying the hex[] array in each call to MDXEnd(), it's aGarrett Wollman1995-04-271-2/+2
| | | | | | | constant. (There probably ought to be a single libc version of it.) Notes: svn path=/head/; revision=8103
* Clean a bunch of -Wall warnings.Poul-Henning Kamp1995-02-241-4/+4
| | | | Notes: svn path=/head/; revision=6684
* Added "const" to the arguments here and there.Poul-Henning Kamp1994-11-071-1/+1
| | | | Notes: svn path=/head/; revision=4245
* Reviewed by: phkPoul-Henning Kamp1994-07-241-0/+68
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. Notes: svn path=/cvs2svn/branches/ORIG/; revision=1802