Skip to content

Commit

Permalink
revoke: 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 9d4d8c6 commit f98ae4a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions revoke/revoke.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (
"errors"
"fmt"
"io"
"io/ioutil"
"net/http"
neturl "net/url"
"sync"
Expand Down Expand Up @@ -318,21 +317,21 @@ func sendOCSPRequest(server string, req []byte, leaf, issuer *x509.Certificate)
return ocsp.ParseResponseForCert(body, leaf, issuer)
}

var crlRead = ioutil.ReadAll
var crlRead = io.ReadAll

// SetCRLFetcher sets the function to use to read from the http response body
func SetCRLFetcher(fn func(io.Reader) ([]byte, error)) {
crlRead = fn
}

var remoteRead = ioutil.ReadAll
var remoteRead = io.ReadAll

// SetRemoteFetcher sets the function to use to read from the http response body
func SetRemoteFetcher(fn func(io.Reader) ([]byte, error)) {
remoteRead = fn
}

var ocspRead = ioutil.ReadAll
var ocspRead = io.ReadAll

// SetOCSPFetcher sets the function to use to read from the http response body
func SetOCSPFetcher(fn func(io.Reader) ([]byte, error)) {
Expand Down

0 comments on commit f98ae4a

Please sign in to comment.