httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Encoding code in APR (Was: Re: hooks)
Date Thu, 06 Jul 2000 15:40:39 GMT

I thought of another reason why the md5/sha1 encoding code needs to be in
APR.  It may be VERY portable code, but the results aren't portable.  I
know that makes very little sense.  Think about why we decided to always
use the Apache MD5 code on all platforms.  We got the code originally from
FreeBSD, so we know they have the code, we could have used the crypt
function on FreeBSD.

If you review the archives, you'll discover that later versions of FreeBSD
modified their version of crypt to produce different results.  They are a
bit more secure IIRC, but the results are also just not portable.  This
means that if we don't put the encoding stuff into APR, and somebody uses
an MD5 algorithm on a FreeBSD box, that code will not be portable to a
Windows machine using APR with the lib/util MD5 algorithm.

By putting the MD5 algorithm in APR, we remove that problem, and can
provide a common interface that always implements the same alpgorithm
across all platforms.

With this argument and the argument laid out yesterday about not all
platforms having encoding API's, does anybody still have a problem with
creating lib/apr/encode, and putting ap_(md5/sha1/base64) there?


Ryan Bloom               
406 29th St.
San Francisco, CA 94131

View raw message