Hi all,when I was on the release binaries I realized that the metalink support depends on either OpenSSL or gcrypt/gnutls for the md5/sha1/sha256 calculations ... so seems to me that builds with nss, winssl, darwinssl currently cant support metalink ... on the other side we have already an own md5 implementation in libcurl - what about addding sha1 and sha256 too? I believe that such would fit into libcurl: we deal very often with downloaded files, and it might be a desire not only for metalink that apps want to generate checksums and compare them against provided ones in order to verify the downloaded files ...; so adding APIs for sha1/sha256 would be a benefit I think. I did a quick check only, but seems there are many free implementations around; for sha1 I found already one which I believe would fit from both license and performance (equal to sha1sum); the sha256 I found so far is slower compared to sha256, but I believe we can find a better one, and on the other side it doesnt matter that much - we should implement it the same way as the md5 code which only plugs in if no crypto lib support is available (kinda last resort) ... that reminds me also that f.e. OpenSSL (not checked about the other crypto libs) can be build without support for sha*, so even with OpenSSL aboard it might still be impossible to support metalink ...
Attached the stuff I found so far - both sha1 and sha256 were tested to compile and run on Win32 and Linux64; I did run the performance tests on Linux with a 4.3GB iso image.
comments? Gün.
sha1.tar.gz
Description: GNU Zip compressed data
sha256.tar.gz
Description: GNU Zip compressed data
------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
