mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-26 18:49:20 +03:00
Add better info to GPG classes
This commit is contained in:
parent
38daad6d9b
commit
99816083ef
2 changed files with 17 additions and 1 deletions
|
|
@ -10,7 +10,7 @@ class GnuPG
|
|||
{
|
||||
private
|
||||
$homedir,
|
||||
// Instance of gnupg pecl extension
|
||||
// Instance of gnupg pecl extension https://www.php.net/gnupg
|
||||
$GnuPG,
|
||||
// Instance of \SnappyMail\PGP\GPG
|
||||
$GPG;
|
||||
|
|
|
|||
|
|
@ -188,6 +188,20 @@ class GPG
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO: parse result
|
||||
* https://github.com/the-djmaze/snappymail/issues/89
|
||||
*/
|
||||
protected function listDecryptKeys(/*string|resource*/ $input, /*string|resource*/ $output = null)
|
||||
{
|
||||
$this->setInput($input);
|
||||
$fclose = $this->setOutput($output);
|
||||
$_ENV['PINENTRY_USER_DATA'] = '';
|
||||
$result = $this->exec(['--list-packets']);
|
||||
$fclose && \fclose($fclose);
|
||||
return $output ? true : ($result ? $result['output'] : false);
|
||||
}
|
||||
|
||||
protected function _decrypt(/*string|resource*/ $input, /*string|resource*/ $output = null)
|
||||
{
|
||||
$this->setInput($input);
|
||||
|
|
@ -245,6 +259,7 @@ class GPG
|
|||
*/
|
||||
public function decryptVerify(string $text, string &$plaintext) /*: array|false*/
|
||||
{
|
||||
// TODO: https://github.com/the-djmaze/snappymail/issues/89
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -253,6 +268,7 @@ class GPG
|
|||
*/
|
||||
public function decryptVerifyFile(string $filename, string &$plaintext) /*: array|false*/
|
||||
{
|
||||
// TODO: https://github.com/the-djmaze/snappymail/issues/89
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue