aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/gpg/gpgbin
diff options
context:
space:
mode:
Diffstat (limited to 'lib/crypto/gpg/gpgbin')
-rw-r--r--lib/crypto/gpg/gpgbin/decrypt.go3
-rw-r--r--lib/crypto/gpg/gpgbin/verify.go5
2 files changed, 3 insertions, 5 deletions
diff --git a/lib/crypto/gpg/gpgbin/decrypt.go b/lib/crypto/gpg/gpgbin/decrypt.go
index 09626303..86d5575e 100644
--- a/lib/crypto/gpg/gpgbin/decrypt.go
+++ b/lib/crypto/gpg/gpgbin/decrypt.go
@@ -3,7 +3,6 @@ package gpgbin
import (
"bytes"
"io"
- "io/ioutil"
"git.sr.ht/~rjarry/aerc/models"
)
@@ -12,7 +11,7 @@ import (
// the signature is also verified
func Decrypt(r io.Reader) (*models.MessageDetails, error) {
md := new(models.MessageDetails)
- orig, err := ioutil.ReadAll(r)
+ orig, err := io.ReadAll(r)
if err != nil {
return md, err
}
diff --git a/lib/crypto/gpg/gpgbin/verify.go b/lib/crypto/gpg/gpgbin/verify.go
index 5079a0a2..8208dc0d 100644
--- a/lib/crypto/gpg/gpgbin/verify.go
+++ b/lib/crypto/gpg/gpgbin/verify.go
@@ -3,7 +3,6 @@ package gpgbin
import (
"bytes"
"io"
- "io/ioutil"
"os"
"git.sr.ht/~rjarry/aerc/models"
@@ -15,7 +14,7 @@ func Verify(m io.Reader, s io.Reader) (*models.MessageDetails, error) {
args := []string{"--verify"}
if s != nil {
// Detached sig, save the sig to a tmp file and send msg over stdin
- sig, err := ioutil.TempFile("", "sig")
+ sig, err := os.CreateTemp("", "sig")
if err != nil {
return nil, err
}
@@ -24,7 +23,7 @@ func Verify(m io.Reader, s io.Reader) (*models.MessageDetails, error) {
defer os.Remove(sig.Name())
args = append(args, sig.Name(), "-")
}
- orig, err := ioutil.ReadAll(m)
+ orig, err := io.ReadAll(m)
if err != nil {
return nil, err
}