- Timestamp:
- Apr 5, 2010, 8:58:35 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/advapi32/crypt.c
r21353 r21369 1146 1146 1147 1147 if (RegOpenKeyW(HKEY_LOCAL_MACHINE, providerW, &hKey)) 1148 { 1149 SetLastError(NTE_FAIL); 1150 return FALSE; 1148 { 1149 dprintf(("CryptEnumProvidersW error. cannot open key")); 1150 SetLastError(NTE_FAIL); 1151 return FALSE; 1151 1152 } 1152 1153 … … 2288 2289 BOOL WINAPI SystemFunction036(PVOID pbBuffer, ULONG dwLen) 2289 2290 { 2290 int dev_random;2291 #if 0 2292 dev_random = open("/dev/urandom", O_RDONLY); 2293 if ( dev_random != -1)2291 char *rand_buf = (char*)pbBuffer; 2292 int i; 2293 2294 if (!pbBuffer || dwLen <= 0) 2294 2295 { 2295 if (read(dev_random, pbBuffer, dwLen) == dwLen) 2296 { 2297 close(dev_random); 2298 return TRUE; 2299 } 2300 close(dev_random); 2296 dprintf(("SystemFunction036 error. cannot get random number length %d", dwLen)); 2297 SetLastError(NTE_FAIL); 2298 return FALSE; 2301 2299 } 2302 else 2303 FIXME("couldn't open /dev/urandom\n"); 2304 #endif 2305 SetLastError(NTE_FAIL); 2306 return FALSE; 2307 } 2308 2300 2301 for (i=0; i<dwLen; i++) 2302 { 2303 rand_buf[i] = (char)rand(); 2304 } 2305 return TRUE; 2306 } 2307 2309 2308 /* 2310 2309 These functions have nearly identical prototypes to CryptProtectMemory and CryptUnprotectMemory,
Note:
See TracChangeset
for help on using the changeset viewer.