Made message signing in Cryptography use SHA512 as the message content for... #1

Closed
netkas wants to merge 421 commits from master into dev
Showing only changes of commit 0396ba5843 - Show all commits

View file

@ -37,18 +37,18 @@
throw new InvalidRpcArgumentException('peer', $e); throw new InvalidRpcArgumentException('peer', $e);
} }
if(!$rpcRequest->containsParameter('uuid')) if(!$rpcRequest->containsParameter('signature_uuid', false))
{ {
throw new MissingRpcArgumentException('uuid'); throw new MissingRpcArgumentException('signature_uuid');
} }
try try
{ {
$uuid = Uuid::fromString($rpcRequest->getParameter('uuid')); $signatureUuid = Uuid::fromString($rpcRequest->getParameter('signature_uuid'));
} }
catch(InvalidArgumentException $e) catch(InvalidArgumentException $e)
{ {
throw new InvalidRpcArgumentException('uuid', $e); throw new InvalidRpcArgumentException('signature_uuid', $e);
} }
try try
@ -69,12 +69,12 @@
try try
{ {
if(!ContactManager::contactSigningKeyUuidExists($contact, $uuid)) if(!ContactManager::contactSigningKeyUuidExists($contact, $signatureUuid))
{ {
return $rpcRequest->produceResponse(false); return $rpcRequest->produceResponse(false);
} }
ContactManager::removeContactSigningKey($contact, $uuid); ContactManager::removeContactSigningKey($contact, $signatureUuid);
} }
catch (DatabaseOperationException $e) catch (DatabaseOperationException $e)
{ {