diff --git a/openpgp/v2/write_test.go b/openpgp/v2/write_test.go index 5a04f19e..29fc7b04 100644 --- a/openpgp/v2/write_test.go +++ b/openpgp/v2/write_test.go @@ -1036,7 +1036,10 @@ func TestEncryptWithAEAD(t *testing.T) { if err != nil { t.Fatal(err) } - dec, err := ioutil.ReadAll(m.decrypted) + dec, err := io.ReadAll(m.decrypted) + if err != nil { + t.Fatal(err) + } if !bytes.Equal(dec, []byte(message)) { t.Error("decrypted does not match original") diff --git a/openpgp/write_test.go b/openpgp/write_test.go index 39bb2525..d9953463 100644 --- a/openpgp/write_test.go +++ b/openpgp/write_test.go @@ -301,7 +301,10 @@ func TestEncryptWithAEAD(t *testing.T) { if err != nil { t.Fatal(err) } - dec, err := ioutil.ReadAll(m.decrypted) + dec, err := io.ReadAll(m.decrypted) + if err != nil { + t.Fatal(err) + } if !bytes.Equal(dec, []byte(message)) { t.Error("decrypted does not match original")