[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] error: qcrypto_random_bytes() tried to read from /dev/[

From: Daniel P. Berrange
Subject: Re: [Qemu-devel] error: qcrypto_random_bytes() tried to read from /dev/[u]random, even on windows
Date: Mon, 24 Apr 2017 16:41:17 +0100
User-agent: Mutt/1.7.1 (2016-10-04)

On Mon, Apr 24, 2017 at 03:05:40PM +0100, Peter Maydell wrote:
> 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.

Ok, fair enough.

We can have the existing qcrypto_init() call a qcrypto_random_init()
method to do the one-time initialization task, since that's already
required to run early in order to initialize gnutls when we use it. 

> 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.


|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

reply via email to

[Prev in Thread] Current Thread [Next in Thread]