namespace Friendica\Protocol;
use Friendica\Core\Logger;
-use Friendica\Network\HTTPRequest;
+use Friendica\DI;
use Friendica\Network\Probe;
use Friendica\Util\Crypto;
use Friendica\Util\Strings;
$ret[$x] = substr($ret[$x], 5);
}
} elseif (Strings::normaliseLink($ret[$x]) == 'http://') {
- $ret[$x] = HTTPRequest::fetchUrl($ret[$x]);
+ $ret[$x] = DI::httpRequest()->fetch($ret[$x]);
}
}
}
$salmon = XML::fromArray($xmldata, $xml, false, $namespaces);
// slap them
- $postResult = HTTPRequest::post($url, $salmon, [
+ $postResult = DI::httpRequest()->post($url, $salmon, [
'Content-type: application/magic-envelope+xml',
'Content-length: ' . strlen($salmon)
]);
$salmon = XML::fromArray($xmldata, $xml, false, $namespaces);
// slap them
- $postResult = HTTPRequest::post($url, $salmon, [
+ $postResult = DI::httpRequest()->post($url, $salmon, [
'Content-type: application/magic-envelope+xml',
'Content-length: ' . strlen($salmon)
]);
$salmon = XML::fromArray($xmldata, $xml, false, $namespaces);
// slap them
- $postResult = HTTPRequest::post($url, $salmon, [
+ $postResult = DI::httpRequest()->post($url, $salmon, [
'Content-type: application/magic-envelope+xml',
'Content-length: ' . strlen($salmon)]);
$return_code = $postResult->getReturnCode();
*/
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);
}
}