Remove RAND_bytes calls.

This commit is contained in:
JoelKatz
2012-12-06 10:55:56 -08:00
parent fa5e328561
commit 1d2bb868b6
7 changed files with 20 additions and 41 deletions

View File

@@ -1311,19 +1311,8 @@ bool NetworkOPs::subServer(InfoSub* ispListener, Json::Value& jvResult)
jvResult["stand_alone"] = theConfig.RUN_STANDALONE;
switch (RAND_bytes(uRandom.begin(), uRandom.size()))
{
case 0:
case 1:
jvResult["random"] = uRandom.ToString();
break;
case -1:
default:
// XXX Should probably stop running.
cLog(lsFATAL) << "Internal error: unable to generate secure random.";
break;
}
getRand(uRandom.begin(), uRandom.size());
jvResult["random"] = uRandom.ToString();
return mSubServer.insert(ispListener).second;
}