diff options
Diffstat (limited to 'lib/crypto')
-rw-r--r-- | lib/crypto/gpg/gpg.go | 1 | ||||
-rw-r--r-- | lib/crypto/gpg/gpgbin/encrypt.go | 2 | ||||
-rw-r--r-- | lib/crypto/pgp/pgp.go | 6 |
3 files changed, 4 insertions, 5 deletions
diff --git a/lib/crypto/gpg/gpg.go b/lib/crypto/gpg/gpg.go index e545e1c9..c73272a3 100644 --- a/lib/crypto/gpg/gpg.go +++ b/lib/crypto/gpg/gpg.go @@ -37,7 +37,6 @@ func (m *Mail) ImportKeys(r io.Reader) error { } func (m *Mail) Encrypt(buf *bytes.Buffer, rcpts []string, signer string, decryptKeys openpgp.PromptFunction, header *mail.Header) (io.WriteCloser, error) { - return Encrypt(buf, header.Header.Header, rcpts, signer) } diff --git a/lib/crypto/gpg/gpgbin/encrypt.go b/lib/crypto/gpg/gpgbin/encrypt.go index e72ba148..31245a74 100644 --- a/lib/crypto/gpg/gpgbin/encrypt.go +++ b/lib/crypto/gpg/gpgbin/encrypt.go @@ -11,7 +11,7 @@ import ( // Encrypt runs gpg --encrypt [--sign] -r [recipient]. The default is to have // --trust-model always set func Encrypt(r io.Reader, to []string, from string) ([]byte, error) { - //TODO probably shouldn't have --trust-model always a default + // TODO probably shouldn't have --trust-model always a default args := []string{ "--armor", "--trust-model", "always", diff --git a/lib/crypto/pgp/pgp.go b/lib/crypto/pgp/pgp.go index 647b091b..c305f068 100644 --- a/lib/crypto/pgp/pgp.go +++ b/lib/crypto/pgp/pgp.go @@ -31,10 +31,10 @@ var ( func (m *Mail) Init() error { logging.Infof("Initializing PGP keyring") - os.MkdirAll(path.Join(xdg.DataHome(), "aerc"), 0700) + os.MkdirAll(path.Join(xdg.DataHome(), "aerc"), 0o700) lockpath := path.Join(xdg.DataHome(), "aerc", "keyring.lock") - lockfile, err := os.OpenFile(lockpath, os.O_CREATE|os.O_EXCL, 0600) + lockfile, err := os.OpenFile(lockpath, os.O_CREATE|os.O_EXCL, 0o600) if err != nil { // TODO: Consider connecting to main process over IPC socket locked = false @@ -149,7 +149,7 @@ func (m *Mail) ImportKeys(r io.Reader) error { Keyring = append(Keyring, keys...) if locked { keypath := path.Join(xdg.DataHome(), "aerc", "keyring.asc") - keyfile, err := os.OpenFile(keypath, os.O_CREATE|os.O_APPEND, 0600) + keyfile, err := os.OpenFile(keypath, os.O_CREATE|os.O_APPEND, 0o600) if err != nil { return err } |