mirror of
https://github.com/friendica/friendica
synced 2025-04-28 01:10:12 +00:00
Fix warnings ("Divide by zero" and "key parameter is not a valid public key")
This commit is contained in:
parent
d0e9fdab5e
commit
efb1c630fd
2 changed files with 5 additions and 3 deletions
|
@ -3139,7 +3139,9 @@ class Diaspora
|
|||
$json = json_encode(["iv" => $b_iv, "key" => $b_aes_key]);
|
||||
|
||||
$encrypted_key_bundle = "";
|
||||
openssl_public_encrypt($json, $encrypted_key_bundle, $pubkey);
|
||||
if (!@openssl_public_encrypt($json, $encrypted_key_bundle, $pubkey)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$json_object = json_encode(
|
||||
["aes_key" => base64_encode($encrypted_key_bundle),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue