Skip to content

Commit 62ebbe3

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

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

Diff for: csr/csr_test.go

+4-6
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,16 @@ import (
99
"crypto/x509/pkix"
1010
"encoding/asn1"
1111
"encoding/pem"
12-
"io/ioutil"
12+
"os"
1313
"testing"
1414

1515
"github.com/cloudflare/cfssl/errors"
1616
"github.com/cloudflare/cfssl/helpers"
1717
)
1818

19-
//TestNew validate the CertificateRequest created to return with a KeyRequest
20-
//in KeyRequest field
21-
19+
// TestNew validate the CertificateRequest created to return with a KeyRequest
20+
// in KeyRequest field
2221
func TestNew(t *testing.T) {
23-
2422
if cr := New(); cr.KeyRequest == nil {
2523
t.Fatalf("Should create a new, empty certificate request with KeyRequest")
2624
}
@@ -755,7 +753,7 @@ func TestBadReGenerate(t *testing.T) {
755753
var testECDSACertificateFile = "testdata/test-ecdsa-ca.pem"
756754

757755
func TestExtractCertificateRequest(t *testing.T) {
758-
certPEM, err := ioutil.ReadFile(testECDSACertificateFile)
756+
certPEM, err := os.ReadFile(testECDSACertificateFile)
759757
if err != nil {
760758
t.Fatal(err)
761759
}

0 commit comments

Comments
 (0)