summaryrefslogtreecommitdiff
path: root/curvetun.c
diff options
context:
space:
mode:
Diffstat (limited to 'curvetun.c')
-rw-r--r--curvetun.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/curvetun.c b/curvetun.c
index 1b69b2d..ffb6314 100644
--- a/curvetun.c
+++ b/curvetun.c
@@ -257,17 +257,7 @@ static void create_keypair(char *home)
printf("Reading from %s (this may take a while) ...\n", HIG_ENTROPY_SOURCE);
- 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 "HIG_ENTROPY_SOURCE"!\n";
- goto out;
- }
-
- close(fd);
-
+ gen_key_bytes(secretkey, sizeof(secretkey));
crypto_scalarmult_curve25519_base(publickey, secretkey);
memset(path, 0, sizeof(path));