@@ -306,7 +306,7 @@ func SJWTPubKeyVerify(pubKey []byte) (int, error) {
306
306
}
307
307
var certsCA []byte
308
308
// Read in the cert file
309
- certsCA , err = ioutil .ReadFile (globalLibOptions .certCAFile )
309
+ certsCA , err = os .ReadFile (globalLibOptions .certCAFile )
310
310
if err != nil {
311
311
return SJWTRetErrCertReadCAFile , errors .New ("failed to read CA file" )
312
312
}
@@ -326,7 +326,7 @@ func SJWTPubKeyVerify(pubKey []byte) (int, error) {
326
326
}
327
327
var certsCA []byte
328
328
// Read in the cert file
329
- certsCA , err = ioutil .ReadFile (globalLibOptions .certCAInter )
329
+ certsCA , err = os .ReadFile (globalLibOptions .certCAInter )
330
330
if err != nil {
331
331
return SJWTRetErrCertReadCAInter , errors .New ("failed to read intermediate CA file" )
332
332
}
@@ -369,7 +369,7 @@ func SJWTPubKeyVerify(pubKey []byte) (int, error) {
369
369
rootCRL = nil
370
370
var certsCRLData []byte
371
371
// Read in the cert file
372
- certsCRLData , err = ioutil .ReadFile (globalLibOptions .certCRLFile )
372
+ certsCRLData , err = os .ReadFile (globalLibOptions .certCRLFile )
373
373
if err != nil {
374
374
return SJWTRetErrCertReadCRLFile , errors .New ("failed to read CRL file" )
375
375
}
@@ -484,7 +484,7 @@ func SJWTGetURLCachedContent(urlVal string) ([]byte, error) {
484
484
os .Remove (filePath )
485
485
return nil , nil
486
486
}
487
- return ioutil .ReadFile (filePath )
487
+ return os .ReadFile (filePath )
488
488
}
489
489
490
490
// SJWTSetURLCachedContent --
@@ -686,7 +686,7 @@ func SJWTEncodeText(headerJSON string, payloadJSON string, prvkeyPath string) (s
686
686
var signatureValue string
687
687
var ecdsaPrvKey * ecdsa.PrivateKey
688
688
689
- prvkey , _ := ioutil .ReadFile (prvkeyPath )
689
+ prvkey , _ := os .ReadFile (prvkeyPath )
690
690
691
691
if ecdsaPrvKey , ret , err = SJWTParseECPrivateKeyFromPEM (prvkey ); err != nil {
692
692
return "" , ret , err
@@ -776,10 +776,10 @@ func SJWTCheckIdentityPKMode(identityVal string, expireVal int, pubkeyVal string
776
776
pubkey , ret , err = SJWTGetURLContent (pubkeyVal , timeoutVal )
777
777
} else if strings .HasPrefix (pubkeyVal , "file://" ) {
778
778
fileUrl , _ := url .Parse (pubkeyVal )
779
- pubkey , err = ioutil .ReadFile (fileUrl .Path )
779
+ pubkey , err = os .ReadFile (fileUrl .Path )
780
780
ret = SJWTRetErrFileRead
781
781
} else {
782
- pubkey , err = ioutil .ReadFile (pubkeyVal )
782
+ pubkey , err = os .ReadFile (pubkeyVal )
783
783
ret = SJWTRetErrFileRead
784
784
}
785
785
if err != nil {
@@ -1004,7 +1004,7 @@ func SJWTGetIdentity(origTN string, destTN string, attestVal string, origID stri
1004
1004
var prvkey []byte
1005
1005
var err error
1006
1006
1007
- prvkey , err = ioutil .ReadFile (prvkeyPath )
1007
+ prvkey , err = os .ReadFile (prvkeyPath )
1008
1008
if err != nil {
1009
1009
return "" , SJWTRetErrFileRead , fmt .Errorf ("Unable to read private key file: %v" , err )
1010
1010
}
0 commit comments