gpg,sm: Check compliance of the RNG.
authorWerner Koch <wk@gnupg.org>
Mon, 17 Jul 2017 13:52:26 +0000 (15:52 +0200)
committerWerner Koch <wk@gnupg.org>
Mon, 17 Jul 2017 13:53:16 +0000 (15:53 +0200)
commita149afe338d61d86985c533cde5e7dbcd31e8698
treec930065acfb8403fe8391dc0d93b866f599bc52e
parentbbbd0db34b4e387f8dc089fb7d69fdcf2ed91a01
gpg,sm: Check compliance of the RNG.

* common/compliance.c (gnupg_rng_is_compliant): New.
* g10/call-agent.c (start_agent) [W32]: Check rng compliance.
* sm/call-agent.c (start_agent) [W32]: Ditto.
* g10/encrypt.c (encrypt_simple, encrypt_crypt): Check that the RNG is
compliant.
* sm/encrypt.c (gpgsm_encrypt): Ditto.
* g10/sign.c (do_sign): Ditto.
* sm/sign.c (gpgsm_sign): Ditto.
--

Under Windows we need to check that the Jitter RNG is active in de-vs
mode.  Under Linux this is not necessary because /dev/random can be
scrutinized and is believed to provide enough entropy.

Signed-off-by: Werner Koch <wk@gnupg.org>
common/compliance.c
common/compliance.h
g10/call-agent.c
g10/encrypt.c
g10/sign.c
sm/call-agent.c
sm/encrypt.c
sm/sign.c