Skip to content

Commit df5893e

Browse files
committed
initca: replace uses of deprecated io/ioutil
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 62ebbe3 commit df5893e

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

initca/initca_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"bytes"
55
"crypto/ecdsa"
66
"crypto/rsa"
7-
"io/ioutil"
7+
"os"
88
"strings"
99
"testing"
1010
"time"
@@ -64,7 +64,7 @@ var invalidCryptoParams = []csr.KeyRequest{
6464
func TestInitCA(t *testing.T) {
6565
var req *csr.CertificateRequest
6666
hostname := "cloudflare.com"
67-
crl := "http://crl.cloudflare.com/655c6a9b-01c6-4eea-bf21-be690cc315e0.crl" //cert_uuid.crl
67+
crl := "http://crl.cloudflare.com/655c6a9b-01c6-4eea-bf21-be690cc315e0.crl" // cert_uuid.crl
6868
for _, param := range validKeyParams {
6969
for _, caconfig := range validCAConfigs {
7070
req = &csr.CertificateRequest{
@@ -162,7 +162,7 @@ func TestInitCA(t *testing.T) {
162162

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

358358
func TestRenew(t *testing.T) {
359-
in, err := ioutil.ReadFile(testECDSACAFile)
359+
in, err := os.ReadFile(testECDSACAFile)
360360
if err != nil {
361361
t.Fatal(err)
362362
}
@@ -366,7 +366,7 @@ func TestRenew(t *testing.T) {
366366
t.Fatal(err)
367367
}
368368

369-
in, err = ioutil.ReadFile(testECDSACAKeyFile)
369+
in, err = os.ReadFile(testECDSACAKeyFile)
370370
if err != nil {
371371
t.Fatal(err)
372372
}

0 commit comments

Comments
 (0)