From 2cbd31fe26e635e170e1f417a2a015efd54ac79f Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 15 Oct 2013 14:00:37 +0000 Subject: * autoload.cc (CryptAcquireContextW): Remove. (CryptGenRandom): Remove. (CryptReleaseContext): Remove. (SystemFunction036): Define. Add comment to explain that this is actually the RtlGenRandom function. * fhandler.h (class fhandler_dev_random): Drop crypt_prov member. (fhandler_dev_random::fhandler_dev_random): Define inline. (fhandler_dev_random::dup): Drop declaration. * fhandler_random.cc (fhandler_dev_random::fhandler_dev_random): Remove here. (fhandler_dev_random::crypt_gen_random): Use RtlGenRandom to drop dependency to old Crypto API. (fhandler_dev_random::read): Implement an enhanced version of reading random bytes from RtlGenRandom for the sake of a better /dev/random emulation. (fhandler_dev_random::close): Just return 0 since crypt_prov doesn't exisyt anymore. (fhandler_dev_random::dup): Drop entirely for the same reason. --- winsup/cygwin/autoload.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'winsup/cygwin/autoload.cc') diff --git a/winsup/cygwin/autoload.cc b/winsup/cygwin/autoload.cc index ed8080258..f364cf937 100644 --- a/winsup/cygwin/autoload.cc +++ b/winsup/cygwin/autoload.cc @@ -537,9 +537,6 @@ wsock_init () LoadDLLprime (ws2_32, _wsock_init, 0) LoadDLLfunc (CreateProcessAsUserW, 44, advapi32) -LoadDLLfunc (CryptAcquireContextW, 20, advapi32) -LoadDLLfunc (CryptGenRandom, 12, advapi32) -LoadDLLfunc (CryptReleaseContext, 8, advapi32) LoadDLLfunc (DeregisterEventSource, 4, advapi32) LoadDLLfunc (LogonUserW, 24, advapi32) LoadDLLfunc (LookupAccountNameW, 28, advapi32) @@ -563,6 +560,7 @@ LoadDLLfunc (RegQueryInfoKeyW, 48, advapi32) LoadDLLfunc (RegQueryValueExW, 24, advapi32) LoadDLLfunc (RegisterEventSourceW, 8, advapi32) LoadDLLfunc (ReportEventW, 36, advapi32) +LoadDLLfunc (SystemFunction036, 8, advapi32) /* Aka "RtlGenRandom" */ LoadDLLfunc (DnsQuery_A, 24, dnsapi) LoadDLLfunc (DnsRecordListFree, 8, dnsapi) -- cgit v1.2.3