On Wed, Sep 27, 2017 at 02:38:40PM +0000, Francis Dupont via RT wrote: > - it is a matter of taste but IMHO in generate_salt > i and n should be size_t (or at least unsigned). I'm fine with this. > - you removed the ifdef SC_PLATFORM_CRYPTORANDOM > in dst__entropy_getdata. Please put it back as it simplifies > the code and makes sure that dst library never uses a > not crypto library PNRG. BTW don't confuse > isc_entropy_usehook and isc_entropy_sethook, only > the first changes the source of entropy. I removed it because, when we're running with cryptorandom, isc_entropy_getdata() is hooked to dst_random_getdata() anyway, and if we're *not* running with cryptorandom, dst_random_getdata() returns NOTIMPLEMENTED, which means it's best if dst_random_getdata() isn't called directly. Doing it the way I did seems safer and cleaner, and it only adds the overhead of a single function call. Come to think of it, I'd prefer it if it were called dst__random_getdata, to discourage people from relying on it or calling it directly. Just use it as an internal hook function only. If you absolutely insist, I'll put it back the way it was, but I really do think this is architecturally better.