From 44ed0db8c93f6a81fd996f1f10e93051291fbf1d Mon Sep 17 00:00:00 2001 From: Simon Josefsson Date: Wed, 20 Jan 2021 11:50:21 +0100 Subject: gc-random: Replace implementation with call to getrandom. * lib/gc-gnulib.c [GNULIB_GC_RANDOM]: Replace #include's with those needed for getrandom. (gc_init): Remove old randomness code. (gc_done): Likewise. (randomize): Rewrite using getrandom, inspired by getentropy. * m4/gc-random.m4: Remove file. * modules/crypto/gc-random: Drop gc-random.m4, gl_GC_RANDOM, and LIB_GC_RANDOM. Add conditional dependency on getrandom. * modules/crypto/gc-tests (test_gc_LDADD): Drop LIB_GC_RANDOM. --- modules/crypto/gc-random | 6 +----- modules/crypto/gc-tests | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'modules/crypto') diff --git a/modules/crypto/gc-random b/modules/crypto/gc-random index 5158f85765..8a5ae462eb 100644 --- a/modules/crypto/gc-random +++ b/modules/crypto/gc-random @@ -2,13 +2,12 @@ Description: Generic crypto random number functions. Files: -m4/gc-random.m4 Depends-on: crypto/gc +getrandom [test "$ac_cv_libgcrypt" != yes] configure.ac: -gl_GC_RANDOM gl_MODULE_INDICATOR([gc-random]) Makefile.am: @@ -16,9 +15,6 @@ Makefile.am: Include: "gc.h" -Link: -$(LIB_GC_RANDOM) - License: LGPLv2+ diff --git a/modules/crypto/gc-tests b/modules/crypto/gc-tests index 214db7a4e1..7b153d18db 100644 --- a/modules/crypto/gc-tests +++ b/modules/crypto/gc-tests @@ -8,4 +8,4 @@ configure.ac: Makefile.am: TESTS += test-gc check_PROGRAMS += test-gc -test_gc_LDADD = $(LDADD) @LIB_CRYPTO@ $(LIB_GC_RANDOM) +test_gc_LDADD = $(LDADD) @LIB_CRYPTO@ -- cgit v1.2.1