mirror of
https://github.com/php-gnupg/php-gnupg.git
synced 2026-02-05 05:41:34 +00:00
When the message is encrypted with multiple keys and the decryption key(s) added is not the first encrypted key, then it was failing due to invalid early failure when uid was not found in decrypted keys. This changes such behavior and just returns empty key instead in such case.
This commit is contained in:
parent
91e92a2690
commit
74993ff4a2
4 changed files with 137 additions and 4 deletions
|
|
@ -66,7 +66,7 @@ class gnupgt {
|
|||
}
|
||||
|
||||
/**
|
||||
* Import all keys
|
||||
* Import a single key
|
||||
*/
|
||||
static public function import_key($privkey = null)
|
||||
{
|
||||
|
|
@ -78,6 +78,21 @@ class gnupgt {
|
|||
$gpg->import(is_null($privkey) ? $testkey : $privkey);
|
||||
}
|
||||
|
||||
/**
|
||||
* Import all keys
|
||||
*/
|
||||
static public function import_keys()
|
||||
{
|
||||
global $testkey, $testkey2, $testkey3;
|
||||
|
||||
self::reset_key();
|
||||
|
||||
$gpg = self::create_instance();
|
||||
$gpg->import($testkey);
|
||||
$gpg->import($testkey2);
|
||||
$gpg->import($testkey3);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete all keys.
|
||||
* @param null|string $homeDir
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue