mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-22 00:24:19 +01:00
Replace OpenSSL's RAND_bytes() with libsodium's randombytes_buf()
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user