mirror of
https://github.com/clearml/dropbear
synced 2025-02-12 07:25:30 +00:00
use #ifdef DROPBEAR_PRNGD_SOCKET instead of #if
This commit is contained in:
parent
92c4f20089
commit
08543d0c76
@ -59,7 +59,7 @@ process_file(hash_state *hs, const char *filename,
|
|||||||
unsigned int readcount;
|
unsigned int readcount;
|
||||||
int ret = DROPBEAR_FAILURE;
|
int ret = DROPBEAR_FAILURE;
|
||||||
|
|
||||||
#if DROPBEAR_PRNGD_SOCKET
|
#ifdef DROPBEAR_PRNGD_SOCKET
|
||||||
if (prngd)
|
if (prngd)
|
||||||
{
|
{
|
||||||
readfd = connect_unix(filename);
|
readfd = connect_unix(filename);
|
||||||
@ -107,7 +107,7 @@ process_file(hash_state *hs, const char *filename,
|
|||||||
wantread = MIN(sizeof(readbuf), len-readcount);
|
wantread = MIN(sizeof(readbuf), len-readcount);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if DROPBEAR_PRNGD_SOCKET
|
#ifdef DROPBEAR_PRNGD_SOCKET
|
||||||
if (prngd)
|
if (prngd)
|
||||||
{
|
{
|
||||||
char egdcmd[2];
|
char egdcmd[2];
|
||||||
@ -185,7 +185,7 @@ void seedrandom() {
|
|||||||
/* existing state */
|
/* existing state */
|
||||||
sha1_process(&hs, (void*)hashpool, sizeof(hashpool));
|
sha1_process(&hs, (void*)hashpool, sizeof(hashpool));
|
||||||
|
|
||||||
#if DROPBEAR_PRNGD_SOCKET
|
#ifdef DROPBEAR_PRNGD_SOCKET
|
||||||
if (process_file(&hs, DROPBEAR_PRNGD_SOCKET, INIT_SEED_SIZE, 1)
|
if (process_file(&hs, DROPBEAR_PRNGD_SOCKET, INIT_SEED_SIZE, 1)
|
||||||
!= DROPBEAR_SUCCESS) {
|
!= DROPBEAR_SUCCESS) {
|
||||||
dropbear_exit("Failure reading random device %s",
|
dropbear_exit("Failure reading random device %s",
|
||||||
|
Loading…
Reference in New Issue
Block a user