mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-07-08 09:28:49 +00:00
[securemail] Upgrade singpolyma/openpgp to version 0.6.0
- Add missing use statement in SecureTestEmail - Address https://github.com/friendica/friendica/issues/12011#issuecomment-1321196332 - phpseclib version 3 dependency is implied from the core so it is removed from the addon
This commit is contained in:
parent
30329df0dd
commit
c18e0dc66a
60 changed files with 660 additions and 36426 deletions
20
securemail/vendor/singpolyma/openpgp-php/tests/sodium_suite.php
vendored
Normal file
20
securemail/vendor/singpolyma/openpgp-php/tests/sodium_suite.php
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/* The tests which require phpseclib */
|
||||
|
||||
require_once dirname(__FILE__).'/../lib/openpgp.php';
|
||||
require_once dirname(__FILE__).'/../lib/openpgp_sodium.php';
|
||||
|
||||
class SodiumMessageVerification extends TestCase {
|
||||
public function oneMessageEdDSA($pkey, $path) {
|
||||
$pkeyM = OpenPGP_Message::parse(file_get_contents(dirname(__FILE__) . '/data/' . $pkey));
|
||||
$m = OpenPGP_Message::parse(file_get_contents(dirname(__FILE__) . '/data/' . $path));
|
||||
$verify = sodium_make_verifier($pkeyM);
|
||||
$this->assertSame($m->verified_signatures(array('EdDSA' => $verify)), $m->signatures());
|
||||
}
|
||||
|
||||
public function tested25519() {
|
||||
$this->oneMessageEdDSA('ed25519.public_key', 'ed25519.sig');
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue