X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FProtocol%2FSalmon.php;h=81b1f7528d67f7725e0d0c96027b997505970e2c;hb=424a85bb9424d5b826734147add52f4d196f13c9;hp=d082909ae5196a8af0ced2507d27f787f09a8ea4;hpb=1b0a8ec5c0e46e2ef45004b0c1f65498c5b16b36;p=friendica.git diff --git a/src/Protocol/Salmon.php b/src/Protocol/Salmon.php index d082909ae5..81b1f7528d 100644 --- a/src/Protocol/Salmon.php +++ b/src/Protocol/Salmon.php @@ -1,6 +1,6 @@ fetch($ret[$x]); } } } - Logger::log('Key located: ' . print_r($ret, true)); + Logger::notice('Key located', ['ret' => $ret]); if (count($ret) == 1) { // We only found one one key so we don't care if the hash matches. @@ -155,7 +155,7 @@ class Salmon $salmon = XML::fromArray($xmldata, $xml, false, $namespaces); // slap them - $postResult = Network::post($url, $salmon, [ + $postResult = DI::httpRequest()->post($url, $salmon, [ 'Content-type: application/magic-envelope+xml', 'Content-length: ' . strlen($salmon) ]); @@ -180,7 +180,7 @@ class Salmon $salmon = XML::fromArray($xmldata, $xml, false, $namespaces); // slap them - $postResult = Network::post($url, $salmon, [ + $postResult = DI::httpRequest()->post($url, $salmon, [ 'Content-type: application/magic-envelope+xml', 'Content-length: ' . strlen($salmon) ]); @@ -203,7 +203,7 @@ class Salmon $salmon = XML::fromArray($xmldata, $xml, false, $namespaces); // slap them - $postResult = Network::post($url, $salmon, [ + $postResult = DI::httpRequest()->post($url, $salmon, [ 'Content-type: application/magic-envelope+xml', 'Content-length: ' . strlen($salmon)]); $return_code = $postResult->getReturnCode(); @@ -229,7 +229,7 @@ class Salmon */ public static function salmonKey($pubkey) { - Crypto::pemToMe($pubkey, $m, $e); - return 'RSA' . '.' . Strings::base64UrlEncode($m, true) . '.' . Strings::base64UrlEncode($e, true); + Crypto::pemToMe($pubkey, $modulus, $exponent); + return 'RSA' . '.' . Strings::base64UrlEncode($modulus, true) . '.' . Strings::base64UrlEncode($exponent, true); } }