On 24 April 2017 at 14:57, Daniel P. Berrange <berra...@redhat.com> 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

Reply via email to