]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/Salmon.php
Merge pull request #10231 from MrPetovan/bug/warnings
[friendica.git] / src / Protocol / Salmon.php
index 35707b63567c5acaf048c9f0b437f38d8269cf71..81b1f7528d67f7725e0d0c96027b997505970e2c 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -22,7 +22,7 @@
 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;
@@ -72,7 +72,7 @@ class Salmon
                                                $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]);
                                }
                        }
                }
@@ -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);
        }
 }