[Composer] Upgrade to phpseclib version 3
- Create custom Key file format for Salmon Magic key - Remove obsolete pemToME and MEtoPem Crypto methods - Remove unused newECKeypair Crypto method - Switch to constant-time Base64 encode/decode in Base64Url Strings methods
This commit is contained in:
parent
a3fb499735
commit
55640eec87
13 changed files with 241 additions and 173 deletions
|
@ -40,6 +40,7 @@ use Friendica\Protocol\ActivityNamespace;
|
|||
use Friendica\Protocol\ActivityPub;
|
||||
use Friendica\Protocol\Email;
|
||||
use Friendica\Protocol\Feed;
|
||||
use Friendica\Protocol\Salmon;
|
||||
use Friendica\Util\Crypto;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\Network;
|
||||
|
@ -1512,12 +1513,10 @@ class Probe
|
|||
$pubkey = $curlResult->getBody();
|
||||
}
|
||||
|
||||
$key = explode('.', $pubkey);
|
||||
try {
|
||||
$data['pubkey'] = Salmon::magicKeyToPem($pubkey);
|
||||
} catch (\Throwable $e) {
|
||||
|
||||
if (sizeof($key) >= 3) {
|
||||
$m = Strings::base64UrlDecode($key[1]);
|
||||
$e = Strings::base64UrlDecode($key[2]);
|
||||
$data['pubkey'] = Crypto::meToPem($m, $e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue