Browse Source

Replace OpenSSL's RAND_bytes() with libsodium's randombytes_buf()

ppa-0.6.1
Jacob 9 years ago
parent
commit
dc2d83bfbe
  1. 2
      daemon/secrets.c
  2. 2
      daemon/wallet.c

2
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));
}

2
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));
}

Loading…
Cancel
Save