@@ -21,7 +21,6 @@ package parsehelpers
2121import (
2222 "errors"
2323 "fmt"
24- "io/ioutil"
2524 "os"
2625 "strconv"
2726 "strings"
@@ -69,7 +68,7 @@ func processRecipientKeys(recipients []string) ([][]byte, [][]byte, [][]byte, []
6968 gpgRecipients = append (gpgRecipients , []byte (value ))
7069
7170 case "jwe" :
72- tmp , err := ioutil .ReadFile (value )
71+ tmp , err := os .ReadFile (value )
7372 if err != nil {
7473 return nil , nil , nil , nil , nil , nil , fmt .Errorf ("unable to read file: %w" , err )
7574 }
@@ -79,7 +78,7 @@ func processRecipientKeys(recipients []string) ([][]byte, [][]byte, [][]byte, []
7978 pubkeys = append (pubkeys , tmp )
8079
8180 case "pkcs7" :
82- tmp , err := ioutil .ReadFile (value )
81+ tmp , err := os .ReadFile (value )
8382 if err != nil {
8483 return nil , nil , nil , nil , nil , nil , fmt .Errorf ("unable to read file %s: %w" , value , err )
8584 }
@@ -89,7 +88,7 @@ func processRecipientKeys(recipients []string) ([][]byte, [][]byte, [][]byte, []
8988 x509s = append (x509s , tmp )
9089
9190 case "pkcs11" :
92- tmp , err := ioutil .ReadFile (value )
91+ tmp , err := os .ReadFile (value )
9392 if err != nil {
9493 return nil , nil , nil , nil , nil , nil , fmt .Errorf ("unable to read file %s: %w" , value , err )
9594 }
@@ -118,7 +117,7 @@ func processRecipientKeys(recipients []string) ([][]byte, [][]byte, [][]byte, []
118117// - <password>
119118func processPwdString (pwdString string ) ([]byte , error ) {
120119 if strings .HasPrefix (pwdString , "file=" ) {
121- return ioutil .ReadFile (pwdString [5 :])
120+ return os .ReadFile (pwdString [5 :])
122121 } else if strings .HasPrefix (pwdString , "pass=" ) {
123122 return []byte (pwdString [5 :]), nil
124123 } else if strings .HasPrefix (pwdString , "fd=" ) {
@@ -179,7 +178,7 @@ func processPrivateKeyFiles(keyFilesAndPwds []string) ([][]byte, [][]byte, [][]b
179178 }
180179
181180 keyfile := parts [0 ]
182- tmp , err := ioutil .ReadFile (keyfile )
181+ tmp , err := os .ReadFile (keyfile )
183182 if err != nil {
184183 return nil , nil , nil , nil , nil , nil , err
185184 }
0 commit comments