Use gpg command (over gpg2) with specific homedir
This commit is contained in:
parent
5b34e63dd5
commit
187029a36b
@ -23,7 +23,7 @@ final class MDMailerHelper {
|
||||
*/
|
||||
public static function pgp_encrypt(string $to, string $msg):string {
|
||||
|
||||
$msg = shell_exec("echo " . escapeshellarg($msg) . " | gpg2 --always-trust --recipient " . escapeshellarg($to) . " --encrypt --armor --local-user " . escapeshellarg(MD_CONF_EMAIL::PGP_ENC_KEY) . " --sign");
|
||||
$msg = shell_exec("echo " . escapeshellarg($msg) . " | gpg --always-trust --homedir " . escapeshellarg(MD_CONF_EMAIL::PGP_HOMEDIR) . " --recipient " . escapeshellarg($to) . " --encrypt --armor --local-user " . escapeshellarg(MD_CONF_EMAIL::PGP_ENC_KEY) . " --sign");
|
||||
if ($msg === null) return "Error encrypting message";
|
||||
return $msg;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user