From dc2d83bfbea66b9be926e89ad166e88bb4587351 Mon Sep 17 00:00:00 2001 From: Jacob Date: Thu, 7 Jul 2016 13:42:28 -0500 Subject: [PATCH] Replace OpenSSL's RAND_bytes() with libsodium's randombytes_buf() --- daemon/secrets.c | 2 +- daemon/wallet.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/secrets.c b/daemon/secrets.c index 9794b9106..aac0ed9b3 100644 --- a/daemon/secrets.c +++ b/daemon/secrets.c @@ -147,7 +147,7 @@ static void new_keypair(struct lightningd_state *dstate, struct privkey *privkey, struct pubkey *pubkey) { do { - randombytes_buf(privkey->secret, sizeof(privkey->secret)); + randombytes_buf(privkey->secret, sizeof(privkey->secret)); } while (!pubkey_from_privkey(dstate->secpctx, privkey, pubkey)); } diff --git a/daemon/wallet.c b/daemon/wallet.c index c1dfd1b5a..f56584f20 100644 --- a/daemon/wallet.c +++ b/daemon/wallet.c @@ -25,7 +25,7 @@ static void new_keypair(struct lightningd_state *dstate, struct privkey *privkey, struct pubkey *pubkey) { do { - randombytes_buf(privkey->secret, sizeof(privkey->secret)); + randombytes_buf(privkey->secret, sizeof(privkey->secret)); } while (!pubkey_from_privkey(dstate->secpctx, privkey, pubkey)); }