|
From: | Peter Maydell |
Subject: | Re: [Qemu-devel] error: qcrypto_random_bytes() tried to read from /dev/[u]random, even on windows |
Date: | Mon, 24 Apr 2017 15:05:40 +0100 |
On 24 April 2017 at 14:57, Daniel P. Berrange <address@hidden> wrote: > This is the extent of gnutls's code in this area > > https://gitlab.com/gnutls/gnutls/blob/master/lib/nettle/sysrng-windows.c > > Our API has the same usage scenario as this, hence my preference to mirror > what gnutls & other crypto libraries are using. I see that only calls CryptAcquireContext once, not twice. I also think we should do what that code does and use a static variable to avoid calling CryptAcquireContext repeatedly. If we want to follow gnutls we should just borrow that code (tweaking the function names etc as appropriate) and credit it: gnutls is LGPL2.1 so no problem doing that. thanks -- PMM
[Prev in Thread] | Current Thread | [Next in Thread] |