From: Cristian Rodríguez Date: Tue, 26 Jul 2022 18:24:12 +0000 (+0000) Subject: gcrypt: prefer the OS RNG X-Git-Tag: v252-rc1~560 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80f967311ac53ae43b5a26332f32cc6665661338;p=thirdparty%2Fsystemd.git gcrypt: prefer the OS RNG by default, gcrypt defaults to an userspace RNG, this is the wrong thing (tm) to do on linux. Switch to the SYSTEM rng instead. --- diff --git a/src/basic/gcrypt-util.c b/src/basic/gcrypt-util.c index 64c63cdab1f..1927fdfe460 100644 --- a/src/basic/gcrypt-util.c +++ b/src/basic/gcrypt-util.c @@ -15,6 +15,8 @@ void initialize_libgcrypt(bool secmem) { * feature should initialize the library manually */ if (!secmem) gcry_control(GCRYCTL_DISABLE_SECMEM); + + gcry_control(GCRYCTL_SET_PREFERRED_RNG_TYPE, GCRY_RNG_TYPE_SYSTEM); gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0); }