Skip to content

Commit 373935a

Browse files
Fix TLS Config Error
Signed-off-by: Anisur Rahman <[email protected]>
1 parent f696c9d commit 373935a

File tree

6 files changed

+15
-10
lines changed

6 files changed

+15
-10
lines changed

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
Source code in this repository, Binaries, Docker images and Charts produced by the build process are licensed under the AppsCode Community License 1.0.0. You may obtain a copy of the License at
44

5-
- [AppsCode-Community-1.0.0](https://github.com/appscode/licenses/raw/1.0.0/AppsCode-Community-1.0.0.md)
5+
- [AppsCode-Community-1.0.0](https://github.com/appscode/licenses/raw/1.0.0/AppsCode-Community-1.0.0.md)

go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,3 +211,5 @@ replace sigs.k8s.io/controller-runtime => github.com/kmodules/controller-runtime
211211
replace github.com/imdario/mergo => github.com/imdario/mergo v0.3.6
212212

213213
replace k8s.io/apiserver => github.com/kmodules/apiserver v0.32.3-0.20250221062720-35dc674c7dd6
214+
215+
replace kmodules.xyz/objectstore-api => github.com/anisurrahman75/objectstore-api v0.0.0-20250923125019-7e661dd70060

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ github.com/Masterminds/semver/v3 v3.3.1/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lpr
7575
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
7676
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
7777
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
78+
github.com/anisurrahman75/objectstore-api v0.0.0-20250923125019-7e661dd70060 h1:SooXahlYDtC7gwwgjxbyJuzwBND/dc+oCwjK2onxuLs=
79+
github.com/anisurrahman75/objectstore-api v0.0.0-20250923125019-7e661dd70060/go.mod h1:LemalivFgrGxl13NsfileTiBje8HjaA1K/rMxmxdozk=
7880
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
7981
github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2 h1:7Ip0wMmLHLRJdrloDxZfhMm0xrLXZS8+COSu2bXmEQs=
8082
github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
@@ -849,8 +851,6 @@ kmodules.xyz/csi-utils v0.29.1 h1:O0WDb/rsqj+FwT3C/KshB9hhBTh84YCP3fVb1UGMuHw=
849851
kmodules.xyz/csi-utils v0.29.1/go.mod h1:tcUPTlt0NSlo0RdsHGvA5+LvXhC1WDloqVUkZrzN9MM=
850852
kmodules.xyz/custom-resources v0.30.0 h1:vR3CbseHMLwR4GvtcJJuRuwIV8voKqFqNii27rMcm1o=
851853
kmodules.xyz/custom-resources v0.30.0/go.mod h1:ZsTuI2mLG2s3byre7bHmpxJ9w0HDqAkRTL1+izGFI24=
852-
kmodules.xyz/objectstore-api v0.32.1 h1:5Os8XBI3tzie0kj+lijWMDo9fU0Z4SiNrg/yDS3X6PQ=
853-
kmodules.xyz/objectstore-api v0.32.1/go.mod h1:LemalivFgrGxl13NsfileTiBje8HjaA1K/rMxmxdozk=
854854
kmodules.xyz/offshoot-api v0.32.0 h1:gogc5scSZe2JoXtZof72UGRl3Tit0kFaFRMkLLT1D8o=
855855
kmodules.xyz/offshoot-api v0.32.0/go.mod h1:tled7OxYZ3SkUJcrVFVVYyd+zXjsRSEm1R6Q3k4gcx0=
856856
kmodules.xyz/openshift v0.29.0 h1:8PXjeQ+usUGkLnYUMSbZrMg+i1OIYBe9UWOeBf2FRzU=

vendor/kmodules.xyz/objectstore-api/api/v1/generated.pb.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/kmodules.xyz/objectstore-api/pkg/blob/blob.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import (
3030
api "kmodules.xyz/objectstore-api/api/v1"
3131

3232
aws2 "github.com/aws/aws-sdk-go-v2/aws"
33+
awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http"
3334
"github.com/aws/aws-sdk-go-v2/config"
3435
"github.com/aws/aws-sdk-go-v2/credentials"
3536
"github.com/aws/aws-sdk-go-v2/service/s3"
@@ -503,7 +504,7 @@ func (b *Blob) getS3Config(ctx context.Context, debug bool) (aws2.Config, error)
503504
return config.LoadDefaultConfig(ctx, loadOptions...)
504505
}
505506

506-
func configureTLS(caCert []byte, insecureTLS bool) (*http.Client, error) {
507+
func configureTLS(caCert []byte, insecureTLS bool) (*awshttp.BuildableClient, error) {
507508
tlsConfig := &tls.Config{
508509
InsecureSkipVerify: insecureTLS,
509510
}
@@ -514,12 +515,12 @@ func configureTLS(caCert []byte, insecureTLS bool) (*http.Client, error) {
514515
}
515516
tlsConfig.RootCAs = caCertPool
516517
}
517-
rt := http.DefaultTransport.(*http.Transport).Clone()
518-
rt.TLSClientConfig = tlsConfig
518+
buildableClient := awshttp.NewBuildableClient().WithTransportOptions(func(tr *http.Transport) {
519+
tr.TLSClientConfig = tlsConfig
520+
})
521+
// https://docs.aws.amazon.com/sdk-for-go/v2/developer-guide/configure-http.html#transport
519522

520-
return &http.Client{
521-
Transport: rt,
522-
}, nil
523+
return buildableClient, nil
523524
}
524525

525526
func (b *Blob) SetPathAsDir(ctx context.Context, path string) error {

vendor/modules.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1765,7 +1765,7 @@ kmodules.xyz/custom-resources/client/clientset/versioned/scheme
17651765
kmodules.xyz/custom-resources/client/clientset/versioned/typed/appcatalog/v1alpha1
17661766
kmodules.xyz/custom-resources/client/clientset/versioned/typed/metrics/v1alpha1
17671767
kmodules.xyz/custom-resources/crds
1768-
# kmodules.xyz/objectstore-api v0.32.1
1768+
# kmodules.xyz/objectstore-api v0.32.1 => github.com/anisurrahman75/objectstore-api v0.0.0-20250923125019-7e661dd70060
17691769
## explicit; go 1.24
17701770
kmodules.xyz/objectstore-api/api/v1
17711771
kmodules.xyz/objectstore-api/pkg/blob
@@ -1968,3 +1968,4 @@ stash.appscode.dev/stash/pkg/util
19681968
# sigs.k8s.io/controller-runtime => github.com/kmodules/controller-runtime v0.20.3-0.20250221050548-8eabe54e7dda
19691969
# github.com/imdario/mergo => github.com/imdario/mergo v0.3.6
19701970
# k8s.io/apiserver => github.com/kmodules/apiserver v0.32.3-0.20250221062720-35dc674c7dd6
1971+
# kmodules.xyz/objectstore-api => github.com/anisurrahman75/objectstore-api v0.0.0-20250923125019-7e661dd70060

0 commit comments

Comments
 (0)