mirror of
https://github.com/friendica/friendica
synced 2025-04-29 14:24:22 +02:00
Log function
implement log() function.
This commit is contained in:
parent
d6d593d724
commit
14fde5dc9b
122 changed files with 1280 additions and 1161 deletions
|
@ -6,6 +6,7 @@ namespace Friendica\Util;
|
|||
|
||||
use Friendica\Core\Addon;
|
||||
use Friendica\Core\Config;
|
||||
use Friendica\Core\Logger;
|
||||
use ASN_BASE;
|
||||
use ASNValue;
|
||||
|
||||
|
@ -232,7 +233,7 @@ class Crypto
|
|||
$result = openssl_pkey_new($openssl_options);
|
||||
|
||||
if (empty($result)) {
|
||||
logger('new_keypair: failed');
|
||||
Logger::log('new_keypair: failed');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -347,7 +348,7 @@ class Crypto
|
|||
private static function encapsulateOther($data, $pubkey, $alg)
|
||||
{
|
||||
if (!$pubkey) {
|
||||
logger('no key. data: '.$data);
|
||||
Logger::log('no key. data: '.$data);
|
||||
}
|
||||
$fn = 'encrypt' . strtoupper($alg);
|
||||
if (method_exists(__CLASS__, $fn)) {
|
||||
|
@ -359,7 +360,7 @@ class Crypto
|
|||
// log the offending call so we can track it down
|
||||
if (!openssl_public_encrypt($key, $k, $pubkey)) {
|
||||
$x = debug_backtrace();
|
||||
logger('RSA failed. ' . print_r($x[0], true));
|
||||
Logger::log('RSA failed. ' . print_r($x[0], true));
|
||||
}
|
||||
|
||||
$result['alg'] = $alg;
|
||||
|
@ -388,7 +389,7 @@ class Crypto
|
|||
private static function encapsulateAes($data, $pubkey)
|
||||
{
|
||||
if (!$pubkey) {
|
||||
logger('aes_encapsulate: no key. data: ' . $data);
|
||||
Logger::log('aes_encapsulate: no key. data: ' . $data);
|
||||
}
|
||||
|
||||
$key = random_bytes(32);
|
||||
|
@ -399,7 +400,7 @@ class Crypto
|
|||
// log the offending call so we can track it down
|
||||
if (!openssl_public_encrypt($key, $k, $pubkey)) {
|
||||
$x = debug_backtrace();
|
||||
logger('aes_encapsulate: RSA failed. ' . print_r($x[0], true));
|
||||
Logger::log('aes_encapsulate: RSA failed. ' . print_r($x[0], true));
|
||||
}
|
||||
|
||||
$result['alg'] = 'aes256cbc';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue