aboutsummaryrefslogtreecommitdiff
path: root/src/net.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-07-14 11:34:47 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2014-07-14 11:35:30 +0200
commit6513a9f7033737458735305a08606280d6d0d33c (patch)
tree79b0a23420171992d8f4da85dfabd186670cc9ac /src/net.cpp
parentd4bed1a6d32e415b5d460bf60217d4950d28165e (diff)
parent4eedf4ffeea6a3734f245f785a8d82d69634dccd (diff)
Merge pull request #4400
4eedf4f make RandAddSeed() use OPENSSL_cleanse() (Philip Kaufmann) 6354935 move rand functions from util to new random.h/.cpp (Philip Kaufmann) 001a53d add GetRandBytes() as wrapper for RAND_bytes() (Philip Kaufmann)
Diffstat (limited to 'src/net.cpp')
-rw-r--r--src/net.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net.cpp b/src/net.cpp
index 6a6d9df6af..3b3d91d652 100644
--- a/src/net.cpp
+++ b/src/net.cpp
@@ -555,7 +555,7 @@ void CNode::PushVersion()
int64_t nTime = (fInbound ? GetAdjustedTime() : GetTime());
CAddress addrYou = (addr.IsRoutable() && !IsProxy(addr) ? addr : CAddress(CService("0.0.0.0",0)));
CAddress addrMe = GetLocalAddress(&addr);
- RAND_bytes((unsigned char*)&nLocalHostNonce, sizeof(nLocalHostNonce));
+ GetRandBytes((unsigned char*)&nLocalHostNonce, sizeof(nLocalHostNonce));
if (fLogIPs)
LogPrint("net", "send version message: version %d, blocks=%d, us=%s, them=%s, peer=%d\n", PROTOCOL_VERSION, nBestHeight, addrMe.ToString(), addrYou.ToString(), id);
else
@@ -1961,7 +1961,7 @@ bool CAddrDB::Write(const CAddrMan& addr)
{
// Generate random temporary filename
unsigned short randv = 0;
- RAND_bytes((unsigned char *)&randv, sizeof(randv));
+ GetRandBytes((unsigned char*)&randv, sizeof(randv));
std::string tmpfn = strprintf("peers.dat.%04x", randv);
// serialize addresses, checksum data up to that point, then append csum