mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-26 14:05:51 +00:00
Remove RAND_bytes calls.
This commit is contained in:
@@ -664,24 +664,16 @@ Json::Value RPCHandler::doRandom(Json::Value jvRequest)
|
||||
{
|
||||
uint256 uRandom;
|
||||
|
||||
switch (RAND_bytes(uRandom.begin(), uRandom.size()))
|
||||
try
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
{
|
||||
Json::Value jvResult;
|
||||
|
||||
jvResult["random"] = uRandom.ToString();
|
||||
|
||||
return jvResult;
|
||||
}
|
||||
break;
|
||||
|
||||
case -1:
|
||||
return rpcError(rpcNOT_SUPPORTED);
|
||||
|
||||
default:
|
||||
return rpcError(rpcINTERNAL);
|
||||
getRand(uRandom.begin(), uRandom.size());
|
||||
Json::Value jvResult;
|
||||
jvResult["random"] = uRandom.ToString();
|
||||
return jvResult;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
return rpcError(rpcINTERNAL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user