Skip to content

Commit

Permalink
naming
Browse files Browse the repository at this point in the history
  • Loading branch information
sgmiller committed Aug 2, 2024
1 parent 5aa7a79 commit 5a58f6c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions httputil/cert_ext_tripper.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ type ignoreExtensionsRoundTripper struct {
logger hclog.Logger
}

// NewIgnoreUnsupportedExtensionsRoundTripper creates a RoundTripper that may be used in an HTTP client which will
// ignore the provided extensions if present on a certificate. If base is nil, the default RoundTripper is used.
func NewIgnoreUnsupportedExtensionsRoundTripper(logger hclog.Logger, base http.RoundTripper, extsToIgnore []asn1.ObjectIdentifier) http.RoundTripper {
// NewIgnoreUnhandledExtensionsRoundTripper creates a RoundTripper that may be used in an HTTP client which will
// ignore the provided extensions if present unhandled on a certificate. If base is nil, the default RoundTripper is used.
func NewIgnoreUnhandledExtensionsRoundTripper(logger hclog.Logger, base http.RoundTripper, extsToIgnore []asn1.ObjectIdentifier) http.RoundTripper {
if len(extsToIgnore) == 0 {
return base
}
Expand Down
2 changes: 1 addition & 1 deletion httputil/cert_ext_tripper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func getClient(t *testing.T, srv *httptest.Server, extsToIgnore []asn1.ObjectIde
certpool := x509.NewCertPool()
certpool.AddCert(rootCert)
client := http.Client{
Transport: NewIgnoreUnsupportedExtensionsRoundTripper(hclog.New(hclog.DefaultOptions), &http.Transport{
Transport: NewIgnoreUnhandledExtensionsRoundTripper(hclog.New(hclog.DefaultOptions), &http.Transport{
TLSClientConfig: &tls.Config{
RootCAs: certpool,
},
Expand Down

0 comments on commit 5a58f6c

Please sign in to comment.