Skip to content

Commit eb63246

Browse files
fix: embed CA certificates for environments without system certs (#238)
1 parent 3c77632 commit eb63246

3 files changed

Lines changed: 10 additions & 1 deletion

File tree

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ require (
1818
github.com/spf13/cobra v1.8.1
1919
github.com/spf13/viper v1.19.0
2020
golang.org/x/crypto v0.35.0
21+
golang.org/x/crypto/x509roots/fallback v0.0.0-20260213171211-a408498e5541
2122
golang.org/x/mod v0.22.0
2223
golang.org/x/time v0.5.0
2324
gopkg.in/yaml.v3 v3.0.1

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDf
138138
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
139139
golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs=
140140
golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ=
141+
golang.org/x/crypto/x509roots/fallback v0.0.0-20260213171211-a408498e5541 h1:FmKxj9ocLKn45jiR2jQMwCVhDvaK7fKQFzfuT9GvyK8=
142+
golang.org/x/crypto/x509roots/fallback v0.0.0-20260213171211-a408498e5541/go.mod h1:+UoQFNBq2p2wO+Q6ddVtYc25GZ6VNdOMyyrd4nrqrKs=
141143
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g=
142144
golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k=
143145
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=

main.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
package main
22

3-
import "github.com/runpod/runpodctl/cmd"
3+
import (
4+
"github.com/runpod/runpodctl/cmd"
5+
6+
// Embed Mozilla CA certificates as fallback for environments without system certs
7+
// (e.g. minimal Docker images like ubuntu:22.04 without ca-certificates installed)
8+
_ "golang.org/x/crypto/x509roots/fallback"
9+
)
410

511
// Version is set at build time via ldflags
612
var Version = "v2.0.0-beta.1"

0 commit comments

Comments
 (0)