Skip to content

Commit

Permalink
initca: replace uses of deprecated io/ioutil
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed Nov 20, 2022
1 parent 62ebbe3 commit df5893e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions initca/initca_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"crypto/ecdsa"
"crypto/rsa"
"io/ioutil"
"os"
"strings"
"testing"
"time"
Expand Down Expand Up @@ -64,7 +64,7 @@ var invalidCryptoParams = []csr.KeyRequest{
func TestInitCA(t *testing.T) {
var req *csr.CertificateRequest
hostname := "cloudflare.com"
crl := "http://crl.cloudflare.com/655c6a9b-01c6-4eea-bf21-be690cc315e0.crl" //cert_uuid.crl
crl := "http://crl.cloudflare.com/655c6a9b-01c6-4eea-bf21-be690cc315e0.crl" // cert_uuid.crl
for _, param := range validKeyParams {
for _, caconfig := range validCAConfigs {
req = &csr.CertificateRequest{
Expand Down Expand Up @@ -162,7 +162,7 @@ func TestInitCA(t *testing.T) {

// Sign RSA and ECDSA customer CSRs.
for _, csrFile := range csrFiles {
csrBytes, err := ioutil.ReadFile(csrFile)
csrBytes, err := os.ReadFile(csrFile)
if err != nil {
t.Fatal("CSR loading error:", err)
}
Expand Down Expand Up @@ -356,7 +356,7 @@ func TestRenewMismatch(t *testing.T) {
}

func TestRenew(t *testing.T) {
in, err := ioutil.ReadFile(testECDSACAFile)
in, err := os.ReadFile(testECDSACAFile)
if err != nil {
t.Fatal(err)
}
Expand All @@ -366,7 +366,7 @@ func TestRenew(t *testing.T) {
t.Fatal(err)
}

in, err = ioutil.ReadFile(testECDSACAKeyFile)
in, err = os.ReadFile(testECDSACAKeyFile)
if err != nil {
t.Fatal(err)
}
Expand Down

0 comments on commit df5893e

Please sign in to comment.