apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: apr_generate_random_bytes() blocks forever
Date Thu, 17 Apr 2003 08:36:11 GMT
On Wed, Apr 16, 2003 at 10:55:23AM -0500, Ben Collins-Sussman wrote:
>...
> So perhaps svn_repos_create() shouldn't be calling apr_uuid_get() at
> all?  Perhaps svn should have its own pseudorandom-nonblocking uuid
> generator?  Perhaps APR could grow one?

SVN should absolutely NOT grow a UUID generator. Don't even start thinking
along those lines. That is squarely in the realm of APR, as it can simply
defer to Windows's builtin function for that platform. I think some unix
platforms actually have it, but APR just rolls its own according to the
spec.

To answer Ben Laurie's question: we could probably use rand() if it was at
all reasonably seeded. I'd have to trace the logic again, but I believe we
shove the random data (along with other info) thru an MD5 hash to produce
some "random" bits. I could be that we hash other stuff, and just use the
random data directly. Not sure.

In any case, it really doesn't need cryptographic random data, but it should
at least have a well-seeded rand() value.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Mime
View raw message