]> git.sesse.net Git - vlc/commitdiff
Win32: Use CRYPT_VERIFYCONTEXT for vlc_rand_bytes
authorKaarlo Raiha <kaarlo.raiha@gmail.com>
Sun, 29 Jan 2012 17:24:30 +0000 (19:24 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Sun, 29 Jan 2012 17:45:06 +0000 (18:45 +0100)
Since we don't require access to persisted private keys

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
src/win32/rand.c

index aff6012178af2f329251e219a07ac516a75b49dd..49c8d5e76e7500bf0c40c919a67a86c0715ae577 100644 (file)
@@ -52,11 +52,11 @@ void vlc_rand_bytes (void *buf, size_t len)
 
     /* acquire default encryption context */
     if( CryptAcquireContext(
-        &hProv,            // Variable to hold returned handle.
-        NULL,              // Use default key container.
-        MS_DEF_PROV,       // Use default CSP.
-        PROV_RSA_FULL,     // Type of provider to acquire.
-        0) )
+        &hProv,                 // Variable to hold returned handle.
+        NULL,                   // Use default key container.
+        MS_DEF_PROV,            // Use default CSP.
+        PROV_RSA_FULL,          // Type of provider to acquire.
+        CRYPT_VERIFYCONTEXT) )  // Flag values
     {
         /* fill buffer with pseudo-random data, intial buffer content
            is used as auxillary random seed */