mirror of
https://git.sr.ht/~rjarry/aerc
synced 2025-07-10 17:00:22 +02:00

During encryption gpg was ignoring trust model of the user in favor of always using the insecure "always". This change removes this override and adds a helpful message if a user tries to encrypt a message with an untrusted key. To revert to the previous behavior users can add "trust-model always" to their gpg.conf file (default ~/.gnupg/gpg.conf). Signed-off-by: Marcin Serwin <marcin@serwin.dev> Acked-by: Tim Culverhouse <tim@timculverhouse.com>
16 lines
279 B
Go
16 lines
279 B
Go
package gpgbin
|
|
|
|
import (
|
|
"io"
|
|
)
|
|
|
|
// Import runs gpg --import-ownertrust and thus imports trusts for keys
|
|
func ImportOwnertrust(r io.Reader) error {
|
|
args := []string{"--import-ownertrust"}
|
|
g := newGpg(r, args)
|
|
err := g.cmd.Run()
|
|
if err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|