apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sander Striker" <stri...@apache.org>
Subject RE: UUID logic required in APR?
Date Sat, 13 Apr 2002 08:11:58 GMT
> From: Justin Erenkrantz [mailto:jerenkrantz@apache.org]
> Sent: 13 April 2002 08:52

> Do we really have to have the UUID functions in APR?  Could we move
> them to apr-util?  

+1 on moving it.  However, it depends on the implementation of uuid_get.
One way to do it (as outlined in the uuid draft) is to use (one of)
the MAC addresses.  This would mean getting a MAC address from a network
interface portably (that could be done by introducing apr_network_mac_get
or something like that).

>(This would allows us to move md5 into apr-util
> as well...)

I don't see why getuuid has to depend on md5 at all.
 
> It seems that getuuid.c could be rewritten to be more portable (i.e.
> use apr_time_now, etc.).  The only catch seems to be the case where
> APR_HAS_RANDOM is 0 - this causes the apr_uuid_get code to use lots
> of non-portable code to achieve "randomness" that may not be
> available via APR.
> 
> Could we just enforce APR_HAS_RANDOM in order to use this function?
> (On systems without APR_HAS_RANDOM, apr_uuid_get wouldn't be
> available.)  Or, would this be too painful?  

Yes, it would IMO.

> If so, I could
> resurrect my idea of an entropy gatherer in APR, but that's a *lot*
> of work.  =/  -- justin

Despite the amount of work, this is the best solution.  Surely there
are apps out there that require "randomness", apart from our uuid_get
code.

Sander


Mime
View raw message