Skip to content

use bcrypt for the windows random generator instead of wincrypt

Steve Lhomme requested to merge robUx4/gnutls:nowincrypt into master

Wincrypt is deprecated and replaced by bcrypt. (see https://docs.microsoft.com/en-us/windows/win32/api/wincrypt/nf-wincrypt-cryptgenrandom)

BCrypt is available in Win10 apps when wincrypt APIs are not. (see https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis#apis-from-ncryptdll)

When building for Vista and up bcrypt is automatically picked and linked statically. (by default mingw targets XP)

This patch will conflict with !1254 (merged) depending on which is merged first. They rely on the same Vista detection but work independently.

Merge request reports