mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-04 23:17:02 +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
|
private
|
||||||
$homedir,
|
$homedir,
|
||||||
// Instance of gnupg pecl extension
|
// Instance of gnupg pecl extension https://www.php.net/gnupg
|
||||||
$GnuPG,
|
$GnuPG,
|
||||||
// Instance of \SnappyMail\PGP\GPG
|
// Instance of \SnappyMail\PGP\GPG
|
||||||
$GPG;
|
$GPG;
|
||||||
|
|
|
||||||
|
|
@ -188,6 +188,20 @@ class GPG
|
||||||
return true;
|
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)
|
protected function _decrypt(/*string|resource*/ $input, /*string|resource*/ $output = null)
|
||||||
{
|
{
|
||||||
$this->setInput($input);
|
$this->setInput($input);
|
||||||
|
|
@ -245,6 +259,7 @@ class GPG
|
||||||
*/
|
*/
|
||||||
public function decryptVerify(string $text, string &$plaintext) /*: array|false*/
|
public function decryptVerify(string $text, string &$plaintext) /*: array|false*/
|
||||||
{
|
{
|
||||||
|
// TODO: https://github.com/the-djmaze/snappymail/issues/89
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -253,6 +268,7 @@ class GPG
|
||||||
*/
|
*/
|
||||||
public function decryptVerifyFile(string $filename, string &$plaintext) /*: array|false*/
|
public function decryptVerifyFile(string $filename, string &$plaintext) /*: array|false*/
|
||||||
{
|
{
|
||||||
|
// TODO: https://github.com/the-djmaze/snappymail/issues/89
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue