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/include/openbsc/bsc_nat.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'openbsc/include') diff --git a/openbsc/include/openbsc/bsc_nat.h b/openbsc/include/openbsc/bsc_nat.h index 72773a981..3090eb045 100644 --- a/openbsc/include/openbsc/bsc_nat.h +++ b/openbsc/include/openbsc/bsc_nat.h @@ -307,9 +307,6 @@ struct bsc_nat { /* control interface */ struct ctrl_handle *ctrl; - - /* for random values */ - int random_fd; }; struct bsc_nat_ussd_con { -- cgit v1.2.3