1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-10-31 15:45:03 -04:00
Commit Graph

16 Commits

Author SHA1 Message Date
Dan McGee
d59324c8ff Use 32-bit wide integer type in PolarSSL code
A look at what this does on 64 bit systems since we were using the
unnecessarily large 'unsigned long' type before even though it was 64
bits wide:

$ ~/bin/bloat-o-meter libalpm.so.old lib/libalpm/.libs/libalpm.so
add/remove: 0/0 grow/shrink: 0/4 up/down: 0/-10412 (-10412)
function                                     old     new   delta
md5_finish                                   370     356     -14
sha2_finish                                  547     531     -16
md5_process                                 3762    2643   -1119
sha2_process                               20356   11093   -9263

The code size is nearly halved in the sha2 case (44% smaller code size),
and md5 gets a nice size reduction (27% smaller) as well.

We also move base64 code to <stdint.h> types as well; we can use
'uint32_t' rather than 'unsigned long' for at least two variables in the
decode function. This doesn't net the same size benefit as the hash code
case, but it is more proper.

Signed-off-by: Dan McGee <dan@archlinux.org>
2012-01-07 11:27:41 -06:00
Dan McGee
835365b817 Update MD5 routines with changes from PolarSSL
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-11 20:17:21 -05:00
Dan McGee
24d8a15308 libalpm md5: use larger and dynamic buffer
This gave at least a 10% improvement on a few tested platforms due to the
reduced number of read calls from files when computing the md5sum. It really
is just a precursor to another patch to come which is to use MD5 functions
that do the job a lot better than anything we can do.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-09-02 10:33:21 -05:00
Dan McGee
93def410b8 Add note about XySSL/PolarSSL name change
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-06-07 10:35:08 -05:00
Dan McGee
a89eae99f6 Fix compile warning fail on older versions of GCC
Signed-off-by: Dan McGee <dan@archlinux.org>
2009-06-30 23:14:18 -05:00
Dan McGee
62b4195c76 libalpm/md5: Fix license header
This was mistakenly referencing the LGPL even after the XySSL code bump, so
fix the license clause to be correct.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-06-03 21:31:31 -05:00
Dan McGee
081ba4816e Update md5 routines
XySSL 0.9 was released; sync our code with the upstream source. Note that
there weren't any real changes besides renaming of macros, so nothing much
to see here.

The biggest change may be the licence- it is now GPL/BSD software rather
than LGPL/BSD. The license header is changed to reflect this.

Signed-off-by: Dan McGee <dan@archlinux.org>
2008-05-08 20:59:18 -05:00
Dan McGee
9781d0d637 Update GNU GPL boilerplate and copyright dates
Update the GPL boilerplate to direct people to the GNU website for a copy of
the license, as well as bump all of Judd's copyrights to 2007.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-12-10 22:55:39 -06:00
Dan McGee
2322909703 War on whitespace
Run the kernel's cleanfile script on all of our source files.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-16 20:18:45 -06:00
Dan McGee
4453ce155c libalpm: Optimize/inline the md5 functionality
The md5 routines are one of the chokepoints of libalpm (main chokepoint being
archive extraction). Although IO delay causes a lot of it, we can at least
inline some of the md5 stuff as we aren't that concerned about space and
eliminate quite a few function calls.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-09-28 23:27:14 -05:00
Dan McGee
942175feaa Add const qualifier to md5_file and alpm_get_md5sum
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-08-20 12:58:17 -04:00
Andrew Fyfe
1cb6d80631 Clean up MD5 code.
* Move alpm md5 functions to lib/libalpm/util.c
	* Remove unneeded includes for md5.h
	* Replace md5 implementation with one from http://www.xyssl.org

Dan: clean up XySSL code by removing parts we don't use, and add a note
saying what changed.
Dan: fix alpm_get_md5sum, off by one error on the malloc call and other
small things.

Signed-off-by: Andrew Fyfe <andrew@neptune-one.net>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-08-16 13:17:33 -04:00
Dan McGee
869e81e1cf This commit looks much more monumental than it is. Almost all just #include
reordering and adding ones that were forgotten (noticed when trying to
compile after reordering).

* Updated the HACKING file to include information on #include usage.
* print -> vprint in "making dir" function in pactest.
2007-03-05 22:13:33 +00:00
Aaron Griffin
d37ad04873 Merged frugalware changes (too many to list). Also added some config file
handling changes (support [sections] to carry over to included files - this
helps with backwards compatibility with existing pacman config files)
2006-10-15 19:31:03 +00:00
Judd Vinet
1b4ce12672 added patch to use the system memcpy for md5 stuff 2005-10-18 18:47:10 +00:00
Judd Vinet
d04baabafa Initial revision 2005-03-15 01:51:43 +00:00