From 7f4b6412bed92a8b503a35908ad55f4651f36419 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Sun, 11 Jun 2000 14:01:18 +0000 Subject: [PATCH] * fhandler_random.cc (read): Call CryptAquireContext with CRYPT_VERIFYCONTEXT. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/fhandler_random.cc | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index cdab85299..705cd55e7 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +Sun Jun 11 15:57:00 2000 Corinna Vinschen + + * fhandler_random.cc (read): Call CryptAquireContext with + CRYPT_VERIFYCONTEXT. + Thu Jun 8 22:49:00 2000 Corinna Vinschen * path.cc (path_conv::check): Erase two lines checked in diff --git a/winsup/cygwin/fhandler_random.cc b/winsup/cygwin/fhandler_random.cc index d8e51c661..9b784a853 100644 --- a/winsup/cygwin/fhandler_random.cc +++ b/winsup/cygwin/fhandler_random.cc @@ -44,9 +44,10 @@ fhandler_dev_random::read (void *ptr, size_t len) return 0; if (!crypt_prov && !CryptAcquireContext (&crypt_prov, NULL, MS_DEF_PROV, PROV_RSA_FULL, - CRYPT_MACHINE_KEYSET) + CRYPT_VERIFYCONTEXT | CRYPT_MACHINE_KEYSET) && !CryptAcquireContext (&crypt_prov, NULL, MS_DEF_PROV, PROV_RSA_FULL, - CRYPT_MACHINE_KEYSET | CRYPT_NEWKEYSET )) + CRYPT_VERIFYCONTEXT | CRYPT_MACHINE_KEYSET + | CRYPT_NEWKEYSET )) { __seterrno (); return -1;