[openbsc 0/4] Use RAND_bytes() instead of rand()

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Daniel Willmann dwilllmann at sysmocom.de
Thu Oct 8 14:10:22 UTC 2015


From: Daniel Willmann <dwillmann at sysmocom.de>

The following patches uses RAND_bytes() from openssl instead of rand() to
generate TMSI/P-TMSI and auth tuples.

I didn't change the use of rand_r() in gb-proxy because the gbproxy test seems
to depend on predictable randomness.

Daniel Willmann (4):
  libmsc: Use RAND_bytes when choosing a tmsi
  gprs: Use RAND_bytes for p-tmsi
  libmsc: Use RAND_bytes to choose auth tuple
  libmsc: Use RAND_bytes to generate a token

 openbsc/configure.ac              |  2 +-
 openbsc/src/gprs/gprs_sgsn.c      |  4 +++-
 openbsc/src/libmsc/Makefile.am    |  2 +-
 openbsc/src/libmsc/auth.c         |  9 +++++++--
 openbsc/src/libmsc/db.c           | 12 ++++++++++--
 openbsc/src/osmo-nitb/Makefile.am |  2 +-
 openbsc/tests/channel/Makefile.am |  2 +-
 openbsc/tests/db/Makefile.am      |  2 +-
 8 files changed, 25 insertions(+), 10 deletions(-)

-- 
2.1.4




More information about the OpenBSC mailing list