X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FPublicRSAKey.php;h=db99fc50b4fc320768b2039c83a662a84bd46948;hb=3bca4fe2a64671d09e08346456cdfa6c12f996e9;hp=a13130d1c98bdd86e2c2b49b0db0483ffd447348;hpb=3cef3ab107f87f999cf4adcc909259925a631cea;p=friendica.git diff --git a/src/Module/PublicRSAKey.php b/src/Module/PublicRSAKey.php index a13130d1c9..db99fc50b4 100644 --- a/src/Module/PublicRSAKey.php +++ b/src/Module/PublicRSAKey.php @@ -1,6 +1,6 @@ parameters['nick'])) { throw new BadRequestException(); } - $nick = $parameters['nick']; + $nick = $this->parameters['nick']; $user = User::getByNickname($nick, ['spubkey']); if (empty($user) || empty($user['spubkey'])) { throw new BadRequestException(); } - Crypto::pemToMe($user['spubkey'], $modulus, $exponent); - - header('Content-type: application/magic-public-key'); - echo 'RSA' . '.' . Strings::base64UrlEncode($modulus, true) . '.' . Strings::base64UrlEncode($exponent, true); - - exit(); + $this->httpExit( + Salmon::salmonKey($user['spubkey']), + Response::TYPE_BLANK, + 'application/magic-public-key' + ); } }