Skip to content

Commit b45b73f

Browse files
committed
Use github.com/smallstep/cli-utils instead of go.step.sm/cli-utils
1 parent 88443dd commit b45b73f

21 files changed

+99
-73
lines changed

authority/export.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ import (
88
"strings"
99

1010
"github.com/pkg/errors"
11-
"github.com/smallstep/certificates/authority/provisioner"
12-
"go.step.sm/cli-utils/step"
13-
"go.step.sm/linkedca"
1411
"google.golang.org/protobuf/types/known/structpb"
12+
13+
"github.com/smallstep/cli-utils/step"
14+
"go.step.sm/linkedca"
15+
16+
"github.com/smallstep/certificates/authority/provisioner"
1517
)
1618

1719
// Export creates a linkedca configuration form the current ca.json and loaded

authority/provisioner/options.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66

77
"github.com/pkg/errors"
88

9-
"go.step.sm/cli-utils/step"
9+
"github.com/smallstep/cli-utils/step"
1010
"go.step.sm/crypto/jose"
1111
"go.step.sm/crypto/x509util"
1212

authority/provisioner/ssh_options.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import (
55
"strings"
66

77
"github.com/pkg/errors"
8-
"go.step.sm/cli-utils/step"
8+
9+
"github.com/smallstep/cli-utils/step"
910
"go.step.sm/crypto/sshutil"
1011

1112
"github.com/smallstep/certificates/authority/policy"

authority/provisioners.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import (
1111

1212
"github.com/pkg/errors"
1313

14-
"go.step.sm/cli-utils/step"
15-
"go.step.sm/cli-utils/ui"
14+
"github.com/smallstep/cli-utils/step"
15+
"github.com/smallstep/cli-utils/ui"
1616
"go.step.sm/crypto/jose"
1717
"go.step.sm/linkedca"
1818

authority/provisioners_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ import (
99
"testing"
1010
"time"
1111

12+
"github.com/stretchr/testify/require"
13+
1214
"go.step.sm/crypto/jose"
1315
"go.step.sm/crypto/keyutil"
1416
"go.step.sm/linkedca"
1517

16-
"github.com/stretchr/testify/require"
17-
1818
"github.com/smallstep/assert"
1919
"github.com/smallstep/certificates/api/render"
2020
"github.com/smallstep/certificates/authority/admin"

ca/adminClient.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ import (
1515
"github.com/pkg/errors"
1616
"google.golang.org/protobuf/encoding/protojson"
1717

18-
"go.step.sm/cli-utils/token"
19-
"go.step.sm/cli-utils/token/provision"
18+
"github.com/smallstep/cli-utils/token"
19+
"github.com/smallstep/cli-utils/token/provision"
2020
"go.step.sm/crypto/jose"
2121
"go.step.sm/crypto/randutil"
2222
"go.step.sm/linkedca"

ca/ca.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ import (
1818
"github.com/go-chi/chi/v5"
1919
"github.com/go-chi/chi/v5/middleware"
2020
"github.com/pkg/errors"
21+
22+
"github.com/smallstep/cli-utils/step"
23+
"github.com/smallstep/nosql"
24+
"go.step.sm/crypto/x509util"
25+
2126
"github.com/smallstep/certificates/acme"
2227
acmeAPI "github.com/smallstep/certificates/acme/api"
2328
acmeNoSQL "github.com/smallstep/certificates/acme/db/nosql"
@@ -35,9 +40,6 @@ import (
3540
"github.com/smallstep/certificates/scep"
3641
scepAPI "github.com/smallstep/certificates/scep/api"
3742
"github.com/smallstep/certificates/server"
38-
"github.com/smallstep/nosql"
39-
"go.step.sm/cli-utils/step"
40-
"go.step.sm/crypto/x509util"
4143
)
4244

4345
type options struct {

ca/client.go

+11-9
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,23 @@ import (
2424
"strings"
2525

2626
"github.com/pkg/errors"
27+
"golang.org/x/net/http2"
28+
"google.golang.org/protobuf/encoding/protojson"
29+
"google.golang.org/protobuf/proto"
30+
31+
"github.com/smallstep/cli-utils/step"
32+
"go.step.sm/crypto/jose"
33+
"go.step.sm/crypto/keyutil"
34+
"go.step.sm/crypto/pemutil"
35+
"go.step.sm/crypto/randutil"
36+
"go.step.sm/crypto/x509util"
37+
2738
"github.com/smallstep/certificates/api"
2839
"github.com/smallstep/certificates/authority"
2940
"github.com/smallstep/certificates/authority/provisioner"
3041
"github.com/smallstep/certificates/ca/client"
3142
"github.com/smallstep/certificates/ca/identity"
3243
"github.com/smallstep/certificates/errs"
33-
"go.step.sm/cli-utils/step"
34-
"go.step.sm/crypto/jose"
35-
"go.step.sm/crypto/keyutil"
36-
"go.step.sm/crypto/pemutil"
37-
"go.step.sm/crypto/randutil"
38-
"go.step.sm/crypto/x509util"
39-
"golang.org/x/net/http2"
40-
"google.golang.org/protobuf/encoding/protojson"
41-
"google.golang.org/protobuf/proto"
4244
)
4345

4446
// DisableIdentity is a global variable to disable the identity.

ca/identity/identity.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ import (
1414
"time"
1515

1616
"github.com/pkg/errors"
17-
"github.com/smallstep/certificates/api"
18-
"go.step.sm/cli-utils/step"
17+
18+
"github.com/smallstep/cli-utils/step"
1919
"go.step.sm/crypto/pemutil"
20+
21+
"github.com/smallstep/certificates/api"
2022
)
2123

2224
// Type represents the different types of identity files.

ca/provisioner.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ import (
66
"time"
77

88
"github.com/pkg/errors"
9-
"github.com/smallstep/certificates/authority/provisioner"
10-
"go.step.sm/cli-utils/token"
11-
"go.step.sm/cli-utils/token/provision"
9+
10+
"github.com/smallstep/cli-utils/token"
11+
"github.com/smallstep/cli-utils/token/provision"
1212
"go.step.sm/crypto/jose"
1313
"go.step.sm/crypto/randutil"
14+
15+
"github.com/smallstep/certificates/authority/provisioner"
1416
)
1517

1618
const tokenLifetime = 5 * time.Minute

cas/stepcas/jwk_issuer.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ import (
88
"time"
99

1010
"github.com/pkg/errors"
11+
12+
"github.com/smallstep/cli-utils/ui"
13+
"go.step.sm/crypto/jose"
14+
"go.step.sm/crypto/randutil"
15+
1116
"github.com/smallstep/certificates/authority/provisioner"
1217
"github.com/smallstep/certificates/ca"
1318
"github.com/smallstep/certificates/cas/apiv1"
14-
"go.step.sm/cli-utils/ui"
15-
"go.step.sm/crypto/jose"
16-
"go.step.sm/crypto/randutil"
1719
)
1820

1921
type jwkIssuer struct {

cmd/step-ca/main.go

+7-6
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@ import (
1616
//nolint:gosec // profile server, if enabled runs on a different port
1717
_ "net/http/pprof"
1818

19+
"github.com/urfave/cli"
20+
1921
"github.com/smallstep/certificates/authority"
2022
"github.com/smallstep/certificates/commands"
21-
"github.com/urfave/cli"
22-
"go.step.sm/cli-utils/command"
23-
"go.step.sm/cli-utils/command/version"
24-
"go.step.sm/cli-utils/step"
25-
"go.step.sm/cli-utils/ui"
26-
"go.step.sm/cli-utils/usage"
23+
"github.com/smallstep/cli-utils/command"
24+
"github.com/smallstep/cli-utils/command/version"
25+
"github.com/smallstep/cli-utils/step"
26+
"github.com/smallstep/cli-utils/ui"
27+
"github.com/smallstep/cli-utils/usage"
2728
"go.step.sm/crypto/pemutil"
2829

2930
// Enabled kms interfaces.

commands/app.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,17 @@ import (
1313
"unicode"
1414

1515
"github.com/pkg/errors"
16+
"github.com/urfave/cli"
17+
18+
"github.com/smallstep/cli-utils/errs"
19+
"github.com/smallstep/cli-utils/step"
20+
1621
"github.com/smallstep/certificates/acme"
1722
"github.com/smallstep/certificates/authority/config"
1823
"github.com/smallstep/certificates/authority/provisioner"
1924
"github.com/smallstep/certificates/ca"
2025
"github.com/smallstep/certificates/db"
2126
"github.com/smallstep/certificates/pki"
22-
"github.com/urfave/cli"
23-
"go.step.sm/cli-utils/errs"
24-
"go.step.sm/cli-utils/step"
2527
)
2628

2729
// AppCommand is the action used as the top action.

commands/export.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ import (
88
"unicode"
99

1010
"github.com/pkg/errors"
11-
"github.com/smallstep/certificates/authority"
12-
"github.com/smallstep/certificates/authority/config"
1311
"github.com/urfave/cli"
1412
"google.golang.org/protobuf/encoding/protojson"
1513

16-
"go.step.sm/cli-utils/command"
17-
"go.step.sm/cli-utils/errs"
14+
"github.com/smallstep/cli-utils/command"
15+
"github.com/smallstep/cli-utils/errs"
16+
17+
"github.com/smallstep/certificates/authority"
18+
"github.com/smallstep/certificates/authority/config"
1819
)
1920

2021
func init() {

commands/onboard.go

+8-6
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,18 @@ import (
99
"os"
1010

1111
"github.com/pkg/errors"
12+
"github.com/urfave/cli"
13+
14+
"github.com/smallstep/cli-utils/command"
15+
"github.com/smallstep/cli-utils/errs"
16+
"github.com/smallstep/cli-utils/fileutil"
17+
"github.com/smallstep/cli-utils/ui"
18+
"go.step.sm/crypto/randutil"
19+
1220
"github.com/smallstep/certificates/authority/config"
1321
"github.com/smallstep/certificates/ca"
1422
"github.com/smallstep/certificates/cas/apiv1"
1523
"github.com/smallstep/certificates/pki"
16-
"github.com/urfave/cli"
17-
"go.step.sm/cli-utils/command"
18-
"go.step.sm/cli-utils/errs"
19-
"go.step.sm/cli-utils/fileutil"
20-
"go.step.sm/cli-utils/ui"
21-
"go.step.sm/crypto/randutil"
2224
)
2325

2426
// defaultOnboardingURL is the production onboarding url, to use a development

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ require (
2828
github.com/sirupsen/logrus v1.9.3
2929
github.com/slackhq/nebula v1.9.4
3030
github.com/smallstep/assert v0.0.0-20200723003110-82e2b9b3b262
31+
github.com/smallstep/cli-utils v0.10.0
3132
github.com/smallstep/go-attestation v0.4.4-0.20240109183208-413678f90935
3233
github.com/smallstep/nosql v0.7.0
3334
github.com/smallstep/pkcs7 v0.0.0-20240911091500-b1cae6277023
3435
github.com/smallstep/scep v0.0.0-20240926084937-8cf1ca453101
3536
github.com/stretchr/testify v1.9.0
3637
github.com/urfave/cli v1.22.16
37-
go.step.sm/cli-utils v0.9.0
3838
go.step.sm/crypto v0.54.0
3939
go.step.sm/linkedca v0.22.1
4040
golang.org/x/crypto v0.28.0

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,8 @@ github.com/slackhq/nebula v1.9.4 h1:p06JxtXT/OBMWt2OQkY7F0phOBb42X93YWNsS1yqC9o=
373373
github.com/slackhq/nebula v1.9.4/go.mod h1:1+4q4wd3dDAjO8rKCttSb9JIVbklQhuJiBp5I0lbIsQ=
374374
github.com/smallstep/assert v0.0.0-20200723003110-82e2b9b3b262 h1:unQFBIznI+VYD1/1fApl1A+9VcBk+9dcqGfnePY87LY=
375375
github.com/smallstep/assert v0.0.0-20200723003110-82e2b9b3b262/go.mod h1:MyOHs9Po2fbM1LHej6sBUT8ozbxmMOFG+E+rx/GSGuc=
376+
github.com/smallstep/cli-utils v0.10.0 h1:CfXNvHtIN5pAzGvGP0NEUZoGFcj5epNEB6RSpSfduek=
377+
github.com/smallstep/cli-utils v0.10.0/go.mod h1:jIeNa5ctrVg89lU5TaQKYd6o1eFxi9mtZu1sXSxpEBg=
376378
github.com/smallstep/go-attestation v0.4.4-0.20240109183208-413678f90935 h1:kjYvkvS/Wdy0PVRDUAA0gGJIVSEZYhiAJtfwYgOYoGA=
377379
github.com/smallstep/go-attestation v0.4.4-0.20240109183208-413678f90935/go.mod h1:vNAduivU014fubg6ewygkAvQC0IQVXqdc8vaGl/0er4=
378380
github.com/smallstep/nosql v0.7.0 h1:YiWC9ZAHcrLCrayfaF+QJUv16I2bZ7KdLC3RpJcnAnE=
@@ -434,8 +436,6 @@ go.opentelemetry.io/otel/sdk v1.29.0 h1:vkqKjk7gwhS8VaWb0POZKmIEDimRCMsopNYnriHy
434436
go.opentelemetry.io/otel/sdk v1.29.0/go.mod h1:pM8Dx5WKnvxLCb+8lG1PRNIDxu9g9b9g59Qr7hfAAok=
435437
go.opentelemetry.io/otel/trace v1.29.0 h1:J/8ZNK4XgR7a21DZUAsbF8pZ5Jcw1VhACmnYt39JTi4=
436438
go.opentelemetry.io/otel/trace v1.29.0/go.mod h1:eHl3w0sp3paPkYstJOmAimxhiFXPg+MMTlEh3nsQgWQ=
437-
go.step.sm/cli-utils v0.9.0 h1:55jYcsQbnArNqepZyAwcato6Zy2MoZDRkWW+jF+aPfQ=
438-
go.step.sm/cli-utils v0.9.0/go.mod h1:Y/CRoWl1FVR9j+7PnAewufAwKmBOTzR6l9+7EYGAnp8=
439439
go.step.sm/crypto v0.54.0 h1:V8p+12Ld0NRA/RBMYoKXA0dWmVKZSdCwP56IwzweT9g=
440440
go.step.sm/crypto v0.54.0/go.mod h1:vQJyTngfZDW+UyZdFzOMCY/txWDAmcwViEUC7Gn4YfU=
441441
go.step.sm/linkedca v0.22.1 h1:GvprpH9P4Sv9U+eZ3bxDgRSSpW14cFDYpe1kS6yWLkw=

pki/pki.go

+13-11
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,19 @@ import (
1717
"time"
1818

1919
"github.com/pkg/errors"
20+
"golang.org/x/crypto/ssh"
21+
22+
"github.com/smallstep/cli-utils/errs"
23+
"github.com/smallstep/cli-utils/fileutil"
24+
"github.com/smallstep/cli-utils/step"
25+
"github.com/smallstep/cli-utils/ui"
26+
"github.com/smallstep/nosql"
27+
"go.step.sm/crypto/jose"
28+
"go.step.sm/crypto/kms"
29+
kmsapi "go.step.sm/crypto/kms/apiv1"
30+
"go.step.sm/crypto/pemutil"
31+
"go.step.sm/linkedca"
32+
2033
"github.com/smallstep/certificates/authority"
2134
"github.com/smallstep/certificates/authority/admin"
2235
admindb "github.com/smallstep/certificates/authority/admin/db/nosql"
@@ -26,17 +39,6 @@ import (
2639
"github.com/smallstep/certificates/cas"
2740
"github.com/smallstep/certificates/cas/apiv1"
2841
"github.com/smallstep/certificates/db"
29-
"github.com/smallstep/nosql"
30-
"go.step.sm/cli-utils/errs"
31-
"go.step.sm/cli-utils/fileutil"
32-
"go.step.sm/cli-utils/step"
33-
"go.step.sm/cli-utils/ui"
34-
"go.step.sm/crypto/jose"
35-
"go.step.sm/crypto/kms"
36-
kmsapi "go.step.sm/crypto/kms/apiv1"
37-
"go.step.sm/crypto/pemutil"
38-
"go.step.sm/linkedca"
39-
"golang.org/x/crypto/ssh"
4042
)
4143

4244
// DeploymentType defines witch type of deployment a user is initializing

pki/pki_test.go

+6-4
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,18 @@ import (
55
"path/filepath"
66
"testing"
77

8+
"github.com/stretchr/testify/assert"
9+
"github.com/stretchr/testify/require"
10+
11+
"github.com/smallstep/cli-utils/step"
12+
"github.com/smallstep/nosql"
13+
814
"github.com/smallstep/certificates/authority/admin"
915
admindb "github.com/smallstep/certificates/authority/admin/db/nosql"
1016
authconfig "github.com/smallstep/certificates/authority/config"
1117
"github.com/smallstep/certificates/authority/provisioner"
1218
"github.com/smallstep/certificates/cas/apiv1"
1319
"github.com/smallstep/certificates/db"
14-
"github.com/smallstep/nosql"
15-
"github.com/stretchr/testify/assert"
16-
"github.com/stretchr/testify/require"
17-
"go.step.sm/cli-utils/step"
1820
)
1921

2022
func withDBDataSource(t *testing.T, dataSource string) func(c *authconfig.Config) error {

pki/templates.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ import (
55
"path/filepath"
66

77
"github.com/pkg/errors"
8+
9+
"github.com/smallstep/cli-utils/errs"
10+
"github.com/smallstep/cli-utils/fileutil"
11+
"github.com/smallstep/cli-utils/step"
12+
813
"github.com/smallstep/certificates/templates"
9-
"go.step.sm/cli-utils/errs"
10-
"go.step.sm/cli-utils/fileutil"
11-
"go.step.sm/cli-utils/step"
1214
)
1315

1416
// getTemplates returns all the templates enabled

templates/templates.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ import (
99

1010
"github.com/Masterminds/sprig/v3"
1111
"github.com/pkg/errors"
12-
"go.step.sm/cli-utils/fileutil"
13-
"go.step.sm/cli-utils/step"
12+
13+
"github.com/smallstep/cli-utils/fileutil"
14+
"github.com/smallstep/cli-utils/step"
1415
)
1516

1617
// TemplateType defines how a template will be written in disk.

0 commit comments

Comments
 (0)