mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 18:11:28 +01:00
Replace OpenSSL's RAND_bytes() with libsodium's randombytes_buf()
This commit is contained in:
parent
4751522162
commit
dc2d83bfbe
@ -147,7 +147,7 @@ static void new_keypair(struct lightningd_state *dstate,
|
|||||||
struct privkey *privkey, struct pubkey *pubkey)
|
struct privkey *privkey, struct pubkey *pubkey)
|
||||||
{
|
{
|
||||||
do {
|
do {
|
||||||
randombytes_buf(privkey->secret, sizeof(privkey->secret));
|
randombytes_buf(privkey->secret, sizeof(privkey->secret));
|
||||||
} while (!pubkey_from_privkey(dstate->secpctx, privkey, pubkey));
|
} while (!pubkey_from_privkey(dstate->secpctx, privkey, pubkey));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ static void new_keypair(struct lightningd_state *dstate,
|
|||||||
struct privkey *privkey, struct pubkey *pubkey)
|
struct privkey *privkey, struct pubkey *pubkey)
|
||||||
{
|
{
|
||||||
do {
|
do {
|
||||||
randombytes_buf(privkey->secret, sizeof(privkey->secret));
|
randombytes_buf(privkey->secret, sizeof(privkey->secret));
|
||||||
} while (!pubkey_from_privkey(dstate->secpctx, privkey, pubkey));
|
} while (!pubkey_from_privkey(dstate->secpctx, privkey, pubkey));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user