* devices.in (dev_storage): Map /dev/random and /dev/urandom to
\Device\Null. * devices.cc: Regenerate. * fhandler.h (fhandler_dev_random::open): Drop declaration. (fhandler_dev_random::close): Ditto. (fhandler_dev_random::crypt_gen_random): Convert to static method. * fhandler_random.cc (fhandler_dev_random::open): Remove so that default fhandler_base::open is used to open \Device\Null. (fhandler_dev_random::close): Ditto. * fhandler_socket.cc (entropy_source): Delete. (fhandler_socket::af_local_set_secret): Remove entropy_source code and call fhandler_dev_random::crypt_gen_random directly instead.
This commit is contained in:
@@ -28,15 +28,6 @@ details. */
|
||||
#define PSEUDO_MULTIPLIER (6364136223846793005LL)
|
||||
#define PSEUDO_SHIFTVAL (21)
|
||||
|
||||
int
|
||||
fhandler_dev_random::open (int flags, mode_t)
|
||||
{
|
||||
set_flags ((flags & ~O_TEXT) | O_BINARY);
|
||||
nohandle (true);
|
||||
set_open_status ();
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* There's a bug in ntsecapi.h (Mingw as well as MSFT). SystemFunction036
|
||||
is, in fact, a WINAPI function, but it's not defined as such. Therefore
|
||||
we have to do it correctly here. */
|
||||
@@ -149,9 +140,3 @@ fhandler_dev_random::read (void *ptr, size_t& len)
|
||||
else if (!crypt_gen_random (ptr, len))
|
||||
len = pseudo_read (ptr, len);
|
||||
}
|
||||
|
||||
int
|
||||
fhandler_dev_random::close ()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user