mirror of
https://github.com/friendica/friendica
synced 2025-04-27 23:50:10 +00:00
Avoid transmitting a deletion message when we don't have a key
This commit is contained in:
parent
888e2ce2a9
commit
a911baf8e5
2 changed files with 12 additions and 2 deletions
|
@ -26,7 +26,7 @@ class Crypto
|
|||
public static function rsaSign($data, $key, $alg = 'sha256')
|
||||
{
|
||||
if (empty($key)) {
|
||||
logger::warning('Empty key parameter', ['callstack' => System::callstack()]);
|
||||
Logger::warning('Empty key parameter', ['callstack' => System::callstack()]);
|
||||
}
|
||||
openssl_sign($data, $sig, $key, (($alg == 'sha1') ? OPENSSL_ALGO_SHA1 : $alg));
|
||||
return $sig;
|
||||
|
@ -42,7 +42,7 @@ class Crypto
|
|||
public static function rsaVerify($data, $sig, $key, $alg = 'sha256')
|
||||
{
|
||||
if (empty($key)) {
|
||||
logger::warning('Empty key parameter', ['callstack' => System::callstack()]);
|
||||
Logger::warning('Empty key parameter', ['callstack' => System::callstack()]);
|
||||
}
|
||||
return openssl_verify($data, $sig, $key, (($alg == 'sha1') ? OPENSSL_ALGO_SHA1 : $alg));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue