]> granicus.if.org Git - php/commitdiff
fix key container access
authorRob Richards <rrichards@php.net>
Thu, 3 Jul 2008 19:40:15 +0000 (19:40 +0000)
committerRob Richards <rrichards@php.net>
Thu, 3 Jul 2008 19:40:15 +0000 (19:40 +0000)
ext/mcrypt/mcrypt.c

index 28a437167944c14d1c2a634cf8a2c38ef6ce85a2..c28a73507f75fb3e56f2776c0e98e906d5b352b0 100644 (file)
@@ -1218,7 +1218,7 @@ int php_mcrypt_iv(php_mcrypt_iv_source source, int size, char **iv_str, int *iv_
 
                        /* It could be done using LoadLibrary but as we rely on 2k+ for 5.3, cleaner to use a clear dependency (Advapi32) and a 
                                standard API call (no f=getAddr..; f();) */
-                       if(!CryptAcquireContext(&hCryptProv, NULL, NULL, PROV_RSA_FULL, 0)) {
+                       if(!CryptAcquireContext(&hCryptProv, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) {
                                php_error_docref(NULL TSRMLS_CC, E_ERROR, "Cannot open random device");
                                return FAILURE;
                        }