Hi Patrik,

>>> Use /dev/urandom as the proper source for random numbers. Verify the
>>> existence of /dev/urandom at compile time and program startup.
>> Out of curiosity, why does it matter that we have /dev/urandom at 
>> compile time?
> 
> automake/autoconf is old skool and assumes that the device where the
> software is compiled is also the one where the software is run.
> Therefore the extra check that everything needed is on board from the
> start. This then allows unit tests to be run during compile time
> checking features where random numbers are needed - perhaps just by
> accident as the test might only validate that the message is properly
> formed or so.
> 
> I'm unfortunately not writing any such tests, if anyone feels like it,
> please send patches... :-)

why not just open /dev/urandom and only if it is not present fallback to C 
library rand() etc.

I mean realistically the device node will be present. Also in the future we 
will be able to use AF_ALG since I have seen patches exposing a per socket 
random number generator.

Regards

Marcel

_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman

Reply via email to