From 9f95ae888589dfddfe1fd325d0fb2f8361f03fab Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Wed, 1 Jul 2015 08:34:16 +0200 Subject: nat: Use RAND_bytes instead of /dev/urandom We don't need to consume all the entropy of the kernel but can use libcrypto (OpenSSL) to generate random data. It is not clear if we need to call RAND_load_file but I think we can assume that our Unices have a /dev/urandom. This takes less CPU time, provides good enough entropy (in theory) and leaves some in the kernel entropy pool. --- openbsc/configure.ac | 1 + 1 file changed, 1 insertion(+) (limited to 'openbsc/configure.ac') diff --git a/openbsc/configure.ac b/openbsc/configure.ac index fb6feb9b9..0af573af3 100644 --- a/openbsc/configure.ac +++ b/openbsc/configure.ac @@ -35,6 +35,7 @@ AC_ARG_ENABLE([nat], [AS_HELP_STRING([--enable-nat], [Build the BSC NAT. Require [osmo_ac_build_nat="$enableval"],[osmo_ac_build_nat="no"]) if test "$osmo_ac_build_nat" = "yes" ; then PKG_CHECK_MODULES(LIBOSMOSCCP, libosmo-sccp >= 0.0.2) + PKG_CHECK_MODULES(LIBCRYPTO, libcrypto) fi AM_CONDITIONAL(BUILD_NAT, test "x$osmo_ac_build_nat" = "xyes") AC_SUBST(osmo_ac_build_nat) -- cgit v1.2.3