Reimplement core::uuid_generate() using libuuid #692
Labels
easy hacks
The solution is expected to be straightforward even if you are new to the project
help wanted
An important and awaited task but we have no human resources for it yet
security
Security, encryption
system
Low-level system-specific stuff
Projects
We have simple implementation of UUID generation using random numbers. It would be great to have alternative optional implementation using libuuid from util-linux package.
Our implementation is portable but unsophisticated. It blindly generates random UUID no matter where it's running and what's the quality of PRNG. libuuid, on the other hand, is capable to check system capabilities: if high-quality random generator is available, it will use it, otherwise it will fallback to using low-level system information like MAC address and system time. It will also employ uuidd if it's present on system.
Steps:
Add libuuid to build scripts (build-3rdparty.py, 3rdparty/Sconscript). Add
--disable-libuuid
to SConstruct. If the option is given, enabletarget_nouuid
target directory, otherwise enabletarget_libuuid
.Basically you can replicate what have been done in this commit to add OpenSSL (you can ignore
openssl_get_platform()
function, it's OpenSSL-specific).Move existing implementation from
roc_core
toroc_core/target_nouuid
target directory.Add new implementation to
roc_core/target_libuuid
using libuuid.Add simple test that will pass for both implementations.
Related docs:
The text was updated successfully, but these errors were encountered: