aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/fhandler_random.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2000-06-11 14:01:18 +0000
committerCorinna Vinschen <corinna@vinschen.de>2000-06-11 14:01:18 +0000
commit7f4b6412bed92a8b503a35908ad55f4651f36419 (patch)
tree143c9b8b78c1b799ba6aa94fdf5912ed87e7219c /winsup/cygwin/fhandler_random.cc
parent46a43a99c6b835dd6f10e2fd4d24cd5c70a26691 (diff)
downloadnewlib-7f4b6412bed92a8b503a35908ad55f4651f36419.zip
newlib-7f4b6412bed92a8b503a35908ad55f4651f36419.tar.gz
newlib-7f4b6412bed92a8b503a35908ad55f4651f36419.tar.bz2
* fhandler_random.cc (read): Call CryptAquireContext with
CRYPT_VERIFYCONTEXT.
Diffstat (limited to 'winsup/cygwin/fhandler_random.cc')
-rw-r--r--winsup/cygwin/fhandler_random.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/fhandler_random.cc b/winsup/cygwin/fhandler_random.cc
index d8e51c6..9b784a8 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;