Skip to content

Commit

Permalink
fix: deprecation warning for ioutil
Browse files Browse the repository at this point in the history
  • Loading branch information
vruge authored Jan 7, 2024
1 parent 41dbed3 commit 67a8ac3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/ssl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import (
"crypto/tls"
"crypto/x509"
"fmt"
"io/ioutil"
"os"
"time"

MQTT "github.com/eclipse/paho.mqtt.golang"
Expand All @@ -59,7 +59,7 @@ func NewTLSConfig() *tls.Config {
// Alternatively, manually add CA certificates to
// default openssl CA bundle.
certpool := x509.NewCertPool()
pemCerts, err := ioutil.ReadFile("samplecerts/CAfile.pem")
pemCerts, err := os.ReadFile("samplecerts/CAfile.pem")
if err == nil {
certpool.AppendCertsFromPEM(pemCerts)
}
Expand Down

0 comments on commit 67a8ac3

Please sign in to comment.