Skip to content

Commit

Permalink
csr: 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 31652f3 commit 62ebbe3
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions csr/csr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,16 @@ import (
"crypto/x509/pkix"
"encoding/asn1"
"encoding/pem"
"io/ioutil"
"os"
"testing"

"github.com/cloudflare/cfssl/errors"
"github.com/cloudflare/cfssl/helpers"
)

//TestNew validate the CertificateRequest created to return with a KeyRequest
//in KeyRequest field

// TestNew validate the CertificateRequest created to return with a KeyRequest
// in KeyRequest field
func TestNew(t *testing.T) {

if cr := New(); cr.KeyRequest == nil {
t.Fatalf("Should create a new, empty certificate request with KeyRequest")
}
Expand Down Expand Up @@ -755,7 +753,7 @@ func TestBadReGenerate(t *testing.T) {
var testECDSACertificateFile = "testdata/test-ecdsa-ca.pem"

func TestExtractCertificateRequest(t *testing.T) {
certPEM, err := ioutil.ReadFile(testECDSACertificateFile)
certPEM, err := os.ReadFile(testECDSACertificateFile)
if err != nil {
t.Fatal(err)
}
Expand Down

0 comments on commit 62ebbe3

Please sign in to comment.