summaryrefslogtreecommitdiff
path: root/curvetun.c
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-06-04 12:01:56 +0200
committerDaniel Borkmann <dborkman@redhat.com>2013-06-04 12:01:56 +0200
commit7ea4576392b014490e6308ad82d695cc85a0b8bd (patch)
tree82b2c8d497acfa9c2b1e8f3d75f1153d00583a62 /curvetun.c
parentb1d59d3eda7ee4f09b30f807d72aac2af58409ac (diff)
rnd: move entropy source definition to rnd
It's better off there anyway. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Diffstat (limited to 'curvetun.c')
-rw-r--r--curvetun.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/curvetun.c b/curvetun.c
index 00fcd2e..458bd0c 100644
--- a/curvetun.c
+++ b/curvetun.c
@@ -43,8 +43,6 @@
#include "crypto_scalarmult_curve25519.h"
#include "crypto_auth_hmacsha512256.h"
-#define CURVETUN_ENTROPY_SOURCE "/dev/random"
-
enum working_mode {
MODE_UNKNOW,
MODE_KEYGEN,
@@ -260,14 +258,14 @@ static void create_keypair(char *home)
char path[PATH_MAX];
const char * errstr = NULL;
- printf("Reading from %s (this may take a while) ...\n", CURVETUN_ENTROPY_SOURCE);
+ printf("Reading from %s (this may take a while) ...\n", HIG_ENTROPY_SOURCE);
- fd = open_or_die(CURVETUN_ENTROPY_SOURCE, O_RDONLY);
+ fd = open_or_die(HIG_ENTROPY_SOURCE, O_RDONLY);
ret = read_exact(fd, secretkey, sizeof(secretkey), 0);
if (ret != sizeof(secretkey)) {
err = EIO;
- errstr = "Cannot read from "CURVETUN_ENTROPY_SOURCE"!\n";
+ errstr = "Cannot read from "HIG_ENTROPY_SOURCE"!\n";
goto out;
}