diff --git a/openpgp/v2/write_test.go b/openpgp/v2/write_test.go index d3c7ff48..28550862 100644 --- a/openpgp/v2/write_test.go +++ b/openpgp/v2/write_test.go @@ -1041,7 +1041,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 e2b8acb0..315e7323 100644 --- a/openpgp/write_test.go +++ b/openpgp/write_test.go @@ -305,7 +305,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")