diff --git a/command/README.md b/command/README.md index af6e17aa..0e26c9fb 100644 --- a/command/README.md +++ b/command/README.md @@ -12,7 +12,7 @@ should exist within its own package if possible. For example, `version` and Any package used by a command but does not contain explicit business logic directly related to the command should exist in the top-level of this repository. For example, the `github.com/smallstep/cli/flags` and -`go.step.sm/cli-utils/errs` package are used by many different commands and +`github.com/smallstep/cli-utils/errs` package are used by many different commands and contain functionality for defining flags and creating/manipulating errors. ### Adding a Command @@ -70,8 +70,8 @@ There are three packages which contain functionality to make writing commands ea - `github.com/smallstep/cli/flags` - `github.com/smallstep/cli/prompts` -- `go.step.sm/cli-utils/errs` -- `go.step.sm/cli-utils/usage` +- `github.com/smallstep/cli-utils/errs` +- `github.com/smallstep/cli-utils/usage` The usage package is used to extend the default documentation provided by `urfave/cli` by enabling us to document arguments, whether they are optional or diff --git a/command/api/api.go b/command/api/api.go index 06f23437..457cdeb1 100644 --- a/command/api/api.go +++ b/command/api/api.go @@ -1,9 +1,11 @@ package api import ( - "github.com/smallstep/cli/command/api/token" "github.com/urfave/cli" - "go.step.sm/cli-utils/command" + + "github.com/smallstep/cli-utils/command" + + "github.com/smallstep/cli/command/api/token" ) func init() { diff --git a/command/api/token/create.go b/command/api/token/create.go index 689c3d98..3d5a2fd2 100644 --- a/command/api/token/create.go +++ b/command/api/token/create.go @@ -12,8 +12,9 @@ import ( "github.com/google/uuid" "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" + + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" ) func createCommand() cli.Command { diff --git a/command/base64/base64.go b/command/base64/base64.go index 17e7495f..32b8c1ea 100644 --- a/command/base64/base64.go +++ b/command/base64/base64.go @@ -8,9 +8,11 @@ import ( "strings" "github.com/pkg/errors" - "github.com/smallstep/cli/utils" "github.com/urfave/cli" - "go.step.sm/cli-utils/command" + + "github.com/smallstep/cli-utils/command" + + "github.com/smallstep/cli/utils" ) func init() { diff --git a/command/beta/beta.go b/command/beta/beta.go index dc2c827a..5b507378 100644 --- a/command/beta/beta.go +++ b/command/beta/beta.go @@ -1,9 +1,11 @@ package beta import ( - "github.com/smallstep/cli/command/ca" "github.com/urfave/cli" - "go.step.sm/cli-utils/command" + + "github.com/smallstep/cli-utils/command" + + "github.com/smallstep/cli/command/ca" ) // init creates and registers the ca command diff --git a/command/ca/acme/eab/add.go b/command/ca/acme/eab/add.go index ead3e379..2fe70c79 100644 --- a/command/ca/acme/eab/add.go +++ b/command/ca/acme/eab/add.go @@ -7,9 +7,9 @@ import ( "github.com/pkg/errors" "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" - adminAPI "github.com/smallstep/certificates/authority/admin/api" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/utils/cautils" ) diff --git a/command/ca/acme/eab/list.go b/command/ca/acme/eab/list.go index 0bc3aeef..f0518986 100644 --- a/command/ca/acme/eab/list.go +++ b/command/ca/acme/eab/list.go @@ -8,9 +8,10 @@ import ( "github.com/pkg/errors" "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" "github.com/smallstep/certificates/ca" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/utils/cautils" ) diff --git a/command/ca/acme/eab/remove.go b/command/ca/acme/eab/remove.go index 655c1be4..857a4df1 100644 --- a/command/ca/acme/eab/remove.go +++ b/command/ca/acme/eab/remove.go @@ -6,7 +6,7 @@ import ( "github.com/pkg/errors" "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" + "github.com/smallstep/cli-utils/errs" "github.com/smallstep/cli/flags" "github.com/smallstep/cli/utils/cautils" diff --git a/command/ca/admin/add.go b/command/ca/admin/add.go index a7f22d18..cdcf2c9c 100644 --- a/command/ca/admin/add.go +++ b/command/ca/admin/add.go @@ -5,12 +5,14 @@ import ( "os" "text/tabwriter" + "github.com/urfave/cli" + adminAPI "github.com/smallstep/certificates/authority/admin/api" + "github.com/smallstep/cli-utils/errs" + "go.step.sm/linkedca" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/utils/cautils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" - "go.step.sm/linkedca" ) func addCommand() cli.Command { diff --git a/command/ca/admin/admin.go b/command/ca/admin/admin.go index 9190e3d3..61360ba2 100644 --- a/command/ca/admin/admin.go +++ b/command/ca/admin/admin.go @@ -4,11 +4,11 @@ import ( "errors" "fmt" - "github.com/smallstep/certificates/ca" "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" + "github.com/smallstep/certificates/ca" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" "go.step.sm/linkedca" ) diff --git a/command/ca/admin/list.go b/command/ca/admin/list.go index 890f646d..3504b84b 100644 --- a/command/ca/admin/list.go +++ b/command/ca/admin/list.go @@ -5,11 +5,13 @@ import ( "os" "text/tabwriter" + "github.com/urfave/cli" + + "github.com/smallstep/cli-utils/errs" + "go.step.sm/linkedca" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/utils/cautils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" - "go.step.sm/linkedca" ) func listCommand() cli.Command { diff --git a/command/ca/admin/remove.go b/command/ca/admin/remove.go index d8eedd36..40caf5d2 100644 --- a/command/ca/admin/remove.go +++ b/command/ca/admin/remove.go @@ -1,10 +1,12 @@ package admin import ( + "github.com/urfave/cli" + + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/utils/cautils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" ) func removeCommand() cli.Command { diff --git a/command/ca/admin/update.go b/command/ca/admin/update.go index ad8f7820..fde48f80 100644 --- a/command/ca/admin/update.go +++ b/command/ca/admin/update.go @@ -5,12 +5,14 @@ import ( "os" "text/tabwriter" + "github.com/urfave/cli" + adminAPI "github.com/smallstep/certificates/authority/admin/api" + "github.com/smallstep/cli-utils/errs" + "go.step.sm/linkedca" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/utils/cautils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" - "go.step.sm/linkedca" ) func updateCommand() cli.Command { diff --git a/command/ca/bootstrap.go b/command/ca/bootstrap.go index 28ef6a42..1d28f3b9 100644 --- a/command/ca/bootstrap.go +++ b/command/ca/bootstrap.go @@ -3,11 +3,13 @@ package ca import ( "strings" + "github.com/urfave/cli" + + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/utils/cautils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" ) func bootstrapCommand() cli.Command { diff --git a/command/ca/ca.go b/command/ca/ca.go index 6482fd2b..bd5e68c5 100644 --- a/command/ca/ca.go +++ b/command/ca/ca.go @@ -1,12 +1,14 @@ package ca import ( + "github.com/urfave/cli" + + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli/command/ca/acme" "github.com/smallstep/cli/command/ca/admin" "github.com/smallstep/cli/command/ca/policy" "github.com/smallstep/cli/command/ca/provisioner" - "github.com/urfave/cli" - "go.step.sm/cli-utils/command" ) // init creates and registers the ca command diff --git a/command/ca/certificate.go b/command/ca/certificate.go index b5a321ca..a5d59feb 100644 --- a/command/ca/certificate.go +++ b/command/ca/certificate.go @@ -5,15 +5,17 @@ import ( "strings" "github.com/pkg/errors" + "github.com/urfave/cli" + + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/step" + "github.com/smallstep/cli-utils/ui" + "go.step.sm/crypto/pemutil" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/token" "github.com/smallstep/cli/utils/cautils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/step" - "go.step.sm/cli-utils/ui" - "go.step.sm/crypto/pemutil" ) func certificateCommand() cli.Command { diff --git a/command/ca/federation.go b/command/ca/federation.go index af971e29..95475377 100644 --- a/command/ca/federation.go +++ b/command/ca/federation.go @@ -6,16 +6,18 @@ import ( "os" "github.com/pkg/errors" + "github.com/urfave/cli" + "github.com/smallstep/certificates/api" "github.com/smallstep/certificates/ca" "github.com/smallstep/certificates/pki" + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" + "go.step.sm/crypto/pemutil" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/utils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" - "go.step.sm/crypto/pemutil" ) type flowType int diff --git a/command/ca/health.go b/command/ca/health.go index 2893a06c..3ad013c5 100644 --- a/command/ca/health.go +++ b/command/ca/health.go @@ -5,11 +5,13 @@ import ( "fmt" "os" + "github.com/urfave/cli" + "github.com/smallstep/certificates/ca" "github.com/smallstep/certificates/pki" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli/flags" - "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" ) func healthCommand() cli.Command { diff --git a/command/ca/init.go b/command/ca/init.go index 94aadd74..52871389 100644 --- a/command/ca/init.go +++ b/command/ca/init.go @@ -14,21 +14,20 @@ import ( "github.com/manifoldco/promptui" "github.com/pkg/errors" + "github.com/urfave/cli" + "github.com/smallstep/certificates/cas/apiv1" "github.com/smallstep/certificates/pki" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/step" + "github.com/smallstep/cli-utils/ui" + "go.step.sm/crypto/kms" + _ "go.step.sm/crypto/kms/azurekms" // enable azurekms + "go.step.sm/crypto/pemutil" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/utils" "github.com/smallstep/cli/utils/cautils" - "github.com/urfave/cli" - - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/step" - "go.step.sm/cli-utils/ui" - "go.step.sm/crypto/kms" - "go.step.sm/crypto/pemutil" - - // Enable azurekms - _ "go.step.sm/crypto/kms/azurekms" ) func initCommand() cli.Command { diff --git a/command/ca/policy/actions/cn.go b/command/ca/policy/actions/cn.go index 731a8def..eba4777a 100644 --- a/command/ca/policy/actions/cn.go +++ b/command/ca/policy/actions/cn.go @@ -6,7 +6,8 @@ import ( "fmt" "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" + + "github.com/smallstep/cli-utils/errs" "github.com/smallstep/cli/command/ca/policy/policycontext" "github.com/smallstep/cli/flags" diff --git a/command/ca/policy/actions/dns.go b/command/ca/policy/actions/dns.go index b163b0fe..22d92723 100644 --- a/command/ca/policy/actions/dns.go +++ b/command/ca/policy/actions/dns.go @@ -6,7 +6,8 @@ import ( "fmt" "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" + + "github.com/smallstep/cli-utils/errs" "github.com/smallstep/cli/command/ca/policy/policycontext" "github.com/smallstep/cli/flags" diff --git a/command/ca/policy/actions/emails.go b/command/ca/policy/actions/emails.go index e426e857..57f69d0d 100644 --- a/command/ca/policy/actions/emails.go +++ b/command/ca/policy/actions/emails.go @@ -6,7 +6,8 @@ import ( "fmt" "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" + + "github.com/smallstep/cli-utils/errs" "github.com/smallstep/cli/command/ca/policy/policycontext" "github.com/smallstep/cli/flags" diff --git a/command/ca/policy/actions/ips.go b/command/ca/policy/actions/ips.go index e394b8ec..7c088917 100644 --- a/command/ca/policy/actions/ips.go +++ b/command/ca/policy/actions/ips.go @@ -6,7 +6,8 @@ import ( "fmt" "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" + + "github.com/smallstep/cli-utils/errs" "github.com/smallstep/cli/command/ca/policy/policycontext" "github.com/smallstep/cli/flags" diff --git a/command/ca/policy/actions/policy.go b/command/ca/policy/actions/policy.go index 04b6cd55..c09ce44f 100644 --- a/command/ca/policy/actions/policy.go +++ b/command/ca/policy/actions/policy.go @@ -10,10 +10,10 @@ import ( "github.com/urfave/cli" "google.golang.org/protobuf/encoding/protojson" - "go.step.sm/cli-utils/errs" + "github.com/smallstep/certificates/ca" + "github.com/smallstep/cli-utils/errs" "go.step.sm/linkedca" - "github.com/smallstep/certificates/ca" "github.com/smallstep/cli/command/ca/policy/policycontext" "github.com/smallstep/cli/internal/command" ) diff --git a/command/ca/policy/actions/principals.go b/command/ca/policy/actions/principals.go index 1c744bf1..c55f8cc2 100644 --- a/command/ca/policy/actions/principals.go +++ b/command/ca/policy/actions/principals.go @@ -6,7 +6,8 @@ import ( "fmt" "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" + + "github.com/smallstep/cli-utils/errs" "github.com/smallstep/cli/command/ca/policy/policycontext" "github.com/smallstep/cli/flags" diff --git a/command/ca/policy/actions/remove.go b/command/ca/policy/actions/remove.go index 6cb7528b..cef54dfc 100644 --- a/command/ca/policy/actions/remove.go +++ b/command/ca/policy/actions/remove.go @@ -5,13 +5,15 @@ import ( "errors" "fmt" + "github.com/urfave/cli" + "github.com/smallstep/certificates/ca" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli/command/ca/policy/policycontext" "github.com/smallstep/cli/flags" "github.com/smallstep/cli/internal/command" "github.com/smallstep/cli/utils/cautils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" ) // RemoveCommand returns the policy remove subcommand. diff --git a/command/ca/policy/actions/uris.go b/command/ca/policy/actions/uris.go index 46e4ea97..f8e5557e 100644 --- a/command/ca/policy/actions/uris.go +++ b/command/ca/policy/actions/uris.go @@ -6,7 +6,8 @@ import ( "fmt" "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" + + "github.com/smallstep/cli-utils/errs" "github.com/smallstep/cli/command/ca/policy/policycontext" "github.com/smallstep/cli/flags" diff --git a/command/ca/policy/actions/view.go b/command/ca/policy/actions/view.go index 01f0c189..92499be6 100644 --- a/command/ca/policy/actions/view.go +++ b/command/ca/policy/actions/view.go @@ -5,14 +5,16 @@ import ( "errors" "fmt" + "github.com/urfave/cli" + "github.com/smallstep/certificates/ca" + "github.com/smallstep/cli-utils/errs" + "go.step.sm/linkedca" + "github.com/smallstep/cli/command/ca/policy/policycontext" "github.com/smallstep/cli/flags" "github.com/smallstep/cli/internal/command" "github.com/smallstep/cli/utils/cautils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" - "go.step.sm/linkedca" ) // ViewCommand returns the policy view subcommand diff --git a/command/ca/provisioner/add.go b/command/ca/provisioner/add.go index 3f61988c..c8c0f207 100644 --- a/command/ca/provisioner/add.go +++ b/command/ca/provisioner/add.go @@ -13,15 +13,17 @@ import ( "strings" "github.com/pkg/errors" - "github.com/smallstep/cli/flags" - "github.com/smallstep/cli/internal/sliceutil" - "github.com/smallstep/cli/utils" "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" + + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" "go.step.sm/crypto/jose" "go.step.sm/crypto/pemutil" "go.step.sm/linkedca" + + "github.com/smallstep/cli/flags" + "github.com/smallstep/cli/internal/sliceutil" + "github.com/smallstep/cli/utils" ) func addCommand() cli.Command { diff --git a/command/ca/provisioner/caConfigClient.go b/command/ca/provisioner/caConfigClient.go index 9054e169..491a9ff7 100644 --- a/command/ca/provisioner/caConfigClient.go +++ b/command/ca/provisioner/caConfigClient.go @@ -4,11 +4,12 @@ import ( "context" "github.com/pkg/errors" + "github.com/smallstep/certificates/authority" "github.com/smallstep/certificates/authority/config" "github.com/smallstep/certificates/authority/provisioner" "github.com/smallstep/certificates/ca" - "go.step.sm/cli-utils/ui" + "github.com/smallstep/cli-utils/ui" "go.step.sm/linkedca" ) diff --git a/command/ca/provisioner/getEncryptedKey.go b/command/ca/provisioner/getEncryptedKey.go index 00c61df6..1c9a78b8 100644 --- a/command/ca/provisioner/getEncryptedKey.go +++ b/command/ca/provisioner/getEncryptedKey.go @@ -4,10 +4,12 @@ import ( "fmt" "github.com/pkg/errors" - "github.com/smallstep/certificates/pki" - "github.com/smallstep/cli/flags" "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" + + "github.com/smallstep/certificates/pki" + "github.com/smallstep/cli-utils/errs" + + "github.com/smallstep/cli/flags" ) func getEncryptedKeyCommand() cli.Command { diff --git a/command/ca/provisioner/list.go b/command/ca/provisioner/list.go index cebd0bc1..4e5efeec 100644 --- a/command/ca/provisioner/list.go +++ b/command/ca/provisioner/list.go @@ -5,10 +5,12 @@ import ( "fmt" "github.com/pkg/errors" - "github.com/smallstep/certificates/pki" - "github.com/smallstep/cli/flags" "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" + + "github.com/smallstep/certificates/pki" + "github.com/smallstep/cli-utils/errs" + + "github.com/smallstep/cli/flags" ) func listCommand() cli.Command { diff --git a/command/ca/provisioner/provisioner.go b/command/ca/provisioner/provisioner.go index 1096f7bd..4d53460e 100644 --- a/command/ca/provisioner/provisioner.go +++ b/command/ca/provisioner/provisioner.go @@ -8,16 +8,18 @@ import ( "github.com/pkg/errors" nebula "github.com/slackhq/nebula/cert" + "github.com/urfave/cli" + "github.com/smallstep/certificates/authority/config" "github.com/smallstep/certificates/authority/provisioner" "github.com/smallstep/certificates/ca" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" + "go.step.sm/linkedca" + "github.com/smallstep/cli/command/ca/provisioner/webhook" "github.com/smallstep/cli/utils" "github.com/smallstep/cli/utils/cautils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" - "go.step.sm/linkedca" ) // Command returns the jwk subcommand. diff --git a/command/ca/provisioner/remove.go b/command/ca/provisioner/remove.go index 3fd6c59d..f4d0855e 100644 --- a/command/ca/provisioner/remove.go +++ b/command/ca/provisioner/remove.go @@ -1,10 +1,11 @@ package provisioner import ( - "github.com/smallstep/certificates/ca" - "github.com/smallstep/cli/flags" "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" + + "github.com/smallstep/certificates/ca" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli/flags" ) func removeCommand() cli.Command { diff --git a/command/ca/provisioner/update.go b/command/ca/provisioner/update.go index 9a8a7bbf..9db64796 100644 --- a/command/ca/provisioner/update.go +++ b/command/ca/provisioner/update.go @@ -11,16 +11,19 @@ import ( "os" "github.com/pkg/errors" - "github.com/smallstep/certificates/ca" - "github.com/smallstep/cli/flags" - "github.com/smallstep/cli/internal/sliceutil" - "github.com/smallstep/cli/utils" "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" + + "github.com/smallstep/certificates/ca" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" + "go.step.sm/crypto/jose" "go.step.sm/crypto/pemutil" "go.step.sm/linkedca" + + "github.com/smallstep/cli/flags" + "github.com/smallstep/cli/internal/sliceutil" + "github.com/smallstep/cli/utils" ) func updateCommand() cli.Command { diff --git a/command/ca/provisioner/webhook/add.go b/command/ca/provisioner/webhook/add.go index 5da01743..6a28bf76 100644 --- a/command/ca/provisioner/webhook/add.go +++ b/command/ca/provisioner/webhook/add.go @@ -3,11 +3,13 @@ package webhook import ( "fmt" + "github.com/urfave/cli" + + "github.com/smallstep/cli-utils/errs" + "go.step.sm/linkedca" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/utils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" - "go.step.sm/linkedca" ) func addCommand() cli.Command { diff --git a/command/ca/provisioner/webhook/remove.go b/command/ca/provisioner/webhook/remove.go index 1dc027fb..26b03780 100644 --- a/command/ca/provisioner/webhook/remove.go +++ b/command/ca/provisioner/webhook/remove.go @@ -1,9 +1,11 @@ package webhook import ( - "github.com/smallstep/cli/flags" "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" + + "github.com/smallstep/cli-utils/errs" + + "github.com/smallstep/cli/flags" ) func removeCommand() cli.Command { diff --git a/command/ca/provisioner/webhook/update.go b/command/ca/provisioner/webhook/update.go index 95f17bbd..cdbcc30c 100644 --- a/command/ca/provisioner/webhook/update.go +++ b/command/ca/provisioner/webhook/update.go @@ -4,12 +4,14 @@ import ( "errors" "fmt" + "github.com/urfave/cli" + "github.com/smallstep/certificates/ca" + "github.com/smallstep/cli-utils/errs" + "go.step.sm/linkedca" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/utils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" - "go.step.sm/linkedca" ) func updateCommand() cli.Command { diff --git a/command/ca/provisioner/webhook/webhook.go b/command/ca/provisioner/webhook/webhook.go index be339194..d8475231 100644 --- a/command/ca/provisioner/webhook/webhook.go +++ b/command/ca/provisioner/webhook/webhook.go @@ -5,13 +5,15 @@ import ( "fmt" "os" + "github.com/urfave/cli" + "github.com/smallstep/certificates/authority/config" "github.com/smallstep/certificates/ca" - "github.com/smallstep/cli/utils/cautils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" "go.step.sm/linkedca" + + "github.com/smallstep/cli/utils/cautils" ) // Command returns the webhook subcommand. diff --git a/command/ca/rekey.go b/command/ca/rekey.go index d72d84c6..0128f699 100644 --- a/command/ca/rekey.go +++ b/command/ca/rekey.go @@ -10,15 +10,17 @@ import ( "time" "github.com/pkg/errors" - "github.com/smallstep/certificates/pki" - "github.com/smallstep/cli/flags" - "github.com/smallstep/cli/utils" "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" + + "github.com/smallstep/certificates/pki" + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" "go.step.sm/crypto/keyutil" "go.step.sm/crypto/pemutil" + + "github.com/smallstep/cli/flags" + "github.com/smallstep/cli/utils" ) func rekeyCertificateCommand() cli.Command { diff --git a/command/ca/renew.go b/command/ca/renew.go index d37de7cd..c422f509 100644 --- a/command/ca/renew.go +++ b/command/ca/renew.go @@ -20,21 +20,23 @@ import ( "time" "github.com/pkg/errors" + "github.com/urfave/cli" + "github.com/smallstep/certificates/api" "github.com/smallstep/certificates/ca" "github.com/smallstep/certificates/pki" + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" + "go.step.sm/crypto/jose" + "go.step.sm/crypto/pemutil" + "go.step.sm/crypto/x509util" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/token" "github.com/smallstep/cli/utils" "github.com/smallstep/cli/utils/cautils" "github.com/smallstep/cli/utils/sysutils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" - "go.step.sm/crypto/jose" - "go.step.sm/crypto/pemutil" - "go.step.sm/crypto/x509util" ) func renewCertificateCommand() cli.Command { diff --git a/command/ca/revoke.go b/command/ca/revoke.go index 0f3d2fbf..2d5415ee 100644 --- a/command/ca/revoke.go +++ b/command/ca/revoke.go @@ -13,20 +13,22 @@ import ( "time" "github.com/pkg/errors" + "github.com/urfave/cli" + "github.com/smallstep/certificates/api" "github.com/smallstep/certificates/authority/provisioner" "github.com/smallstep/certificates/ca" "github.com/smallstep/certificates/pki" - "github.com/smallstep/cli/flags" - "github.com/smallstep/cli/utils/cautils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" "go.step.sm/crypto/jose" "go.step.sm/crypto/pemutil" "go.step.sm/crypto/x509util" "golang.org/x/crypto/ocsp" + + "github.com/smallstep/cli/flags" + "github.com/smallstep/cli/utils/cautils" ) /* diff --git a/command/ca/root.go b/command/ca/root.go index 9e1ca03c..9bbaaa2c 100644 --- a/command/ca/root.go +++ b/command/ca/root.go @@ -6,14 +6,15 @@ import ( "strings" "github.com/pkg/errors" + "github.com/urfave/cli" "github.com/smallstep/certificates/ca" - "github.com/smallstep/cli/flags" - "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" "go.step.sm/crypto/pemutil" + + "github.com/smallstep/cli/flags" ) func rootCommand() cli.Command { diff --git a/command/ca/sign.go b/command/ca/sign.go index a99b71de..5129aa89 100644 --- a/command/ca/sign.go +++ b/command/ca/sign.go @@ -5,15 +5,17 @@ import ( "strings" "github.com/pkg/errors" + "github.com/urfave/cli" + "github.com/smallstep/certificates/api" + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" + "go.step.sm/crypto/pemutil" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/token" "github.com/smallstep/cli/utils/cautils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" - "go.step.sm/crypto/pemutil" ) func signCertificateCommand() cli.Command { diff --git a/command/ca/token.go b/command/ca/token.go index 1df9aec1..7a1e1002 100644 --- a/command/ca/token.go +++ b/command/ca/token.go @@ -5,16 +5,18 @@ import ( "os" "github.com/pkg/errors" + "github.com/urfave/cli" + "github.com/smallstep/certificates/api" "github.com/smallstep/certificates/pki" + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "go.step.sm/crypto/pemutil" + "golang.org/x/crypto/ssh" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/utils" "github.com/smallstep/cli/utils/cautils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" - "go.step.sm/crypto/pemutil" - "golang.org/x/crypto/ssh" ) func tokenCommand() cli.Command { diff --git a/command/certificate/bundle.go b/command/certificate/bundle.go index a6d06235..427eabfa 100644 --- a/command/certificate/bundle.go +++ b/command/certificate/bundle.go @@ -5,12 +5,14 @@ import ( "os" "github.com/pkg/errors" + "github.com/urfave/cli" + + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/utils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" ) func bundleCommand() cli.Command { diff --git a/command/certificate/certificate.go b/command/certificate/certificate.go index 5aa3dbd3..442b59dd 100644 --- a/command/certificate/certificate.go +++ b/command/certificate/certificate.go @@ -2,7 +2,8 @@ package certificate import ( "github.com/urfave/cli" - "go.step.sm/cli-utils/command" + + "github.com/smallstep/cli-utils/command" ) // Command returns the cli.Command for jwt and related subcommands. diff --git a/command/certificate/create.go b/command/certificate/create.go index cd491c5f..0cd897eb 100644 --- a/command/certificate/create.go +++ b/command/certificate/create.go @@ -7,16 +7,18 @@ import ( "time" "github.com/pkg/errors" - "github.com/smallstep/cli/flags" - "github.com/smallstep/cli/internal/cryptoutil" - "github.com/smallstep/cli/utils" "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" + + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" "go.step.sm/crypto/keyutil" "go.step.sm/crypto/pemutil" "go.step.sm/crypto/x509util" + + "github.com/smallstep/cli/flags" + "github.com/smallstep/cli/internal/cryptoutil" + "github.com/smallstep/cli/utils" ) const ( diff --git a/command/certificate/fingerprint.go b/command/certificate/fingerprint.go index fcdefc4d..edac3693 100644 --- a/command/certificate/fingerprint.go +++ b/command/certificate/fingerprint.go @@ -9,12 +9,14 @@ import ( _ "crypto/sha1" "github.com/pkg/errors" - "github.com/smallstep/cli/flags" - "github.com/smallstep/cli/utils" "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" + + "github.com/smallstep/cli-utils/errs" "go.step.sm/crypto/fingerprint" "go.step.sm/crypto/pemutil" + + "github.com/smallstep/cli/flags" + "github.com/smallstep/cli/utils" ) func fingerprintCommand() cli.Command { diff --git a/command/certificate/format.go b/command/certificate/format.go index 430b6d8f..f68cae0e 100644 --- a/command/certificate/format.go +++ b/command/certificate/format.go @@ -7,12 +7,14 @@ import ( "os" "github.com/pkg/errors" + "github.com/urfave/cli" + + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/utils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" ) func formatCommand() cli.Command { diff --git a/command/certificate/inspect.go b/command/certificate/inspect.go index 1f56443f..7d465b34 100644 --- a/command/certificate/inspect.go +++ b/command/certificate/inspect.go @@ -9,13 +9,15 @@ import ( "os" "github.com/pkg/errors" + "github.com/urfave/cli" + "github.com/smallstep/certinfo" + "github.com/smallstep/cli-utils/errs" + zx509 "github.com/smallstep/zcrypto/x509" + "go.step.sm/crypto/pemutil" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/utils" - zx509 "github.com/smallstep/zcrypto/x509" - "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" - "go.step.sm/crypto/pemutil" ) func inspectCommand() cli.Command { diff --git a/command/certificate/install.go b/command/certificate/install.go index aa129629..cab7524e 100644 --- a/command/certificate/install.go +++ b/command/certificate/install.go @@ -9,9 +9,9 @@ import ( "github.com/urfave/cli" "github.com/smallstep/certinfo" + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" "github.com/smallstep/truststore" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" "go.step.sm/crypto/pemutil" ) diff --git a/command/certificate/key.go b/command/certificate/key.go index d3cd2d3a..c7f66237 100644 --- a/command/certificate/key.go +++ b/command/certificate/key.go @@ -4,13 +4,15 @@ import ( "encoding/pem" "fmt" + "github.com/urfave/cli" + + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" + "go.step.sm/crypto/pemutil" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/utils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" - "go.step.sm/crypto/pemutil" ) func keyCommand() cli.Command { diff --git a/command/certificate/lint.go b/command/certificate/lint.go index e0669a53..8eecde2b 100644 --- a/command/certificate/lint.go +++ b/command/certificate/lint.go @@ -6,11 +6,13 @@ import ( "os" "github.com/pkg/errors" - "github.com/smallstep/cli/flags" + "github.com/urfave/cli" + + "github.com/smallstep/cli-utils/errs" zx509 "github.com/smallstep/zcrypto/x509" "github.com/smallstep/zlint" - "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" + + "github.com/smallstep/cli/flags" ) func lintCommand() cli.Command { diff --git a/command/certificate/needsRenewal.go b/command/certificate/needsRenewal.go index 6a228f17..399ef0c3 100644 --- a/command/certificate/needsRenewal.go +++ b/command/certificate/needsRenewal.go @@ -9,10 +9,12 @@ import ( "time" "github.com/pkg/errors" - "github.com/smallstep/cli/flags" "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" + + "github.com/smallstep/cli-utils/errs" "go.step.sm/crypto/pemutil" + + "github.com/smallstep/cli/flags" ) const defaultPercentUsedThreshold = 66 diff --git a/command/certificate/p12.go b/command/certificate/p12.go index 5caf8d48..f555bd09 100644 --- a/command/certificate/p12.go +++ b/command/certificate/p12.go @@ -5,15 +5,17 @@ import ( "fmt" "github.com/pkg/errors" - "github.com/smallstep/cli/flags" - "github.com/smallstep/cli/utils" "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" + "software.sslmate.com/src/go-pkcs12" + + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" "go.step.sm/crypto/pemutil" "go.step.sm/crypto/x509util" - "software.sslmate.com/src/go-pkcs12" + + "github.com/smallstep/cli/flags" + "github.com/smallstep/cli/utils" ) func p12Command() cli.Command { diff --git a/command/certificate/sign.go b/command/certificate/sign.go index ea0d992c..628a391c 100644 --- a/command/certificate/sign.go +++ b/command/certificate/sign.go @@ -12,14 +12,15 @@ import ( "time" "github.com/pkg/errors" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" + "github.com/urfave/cli" + "go.step.sm/crypto/pemutil" + "go.step.sm/crypto/x509util" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/internal/cryptoutil" "github.com/smallstep/cli/utils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" - "go.step.sm/crypto/pemutil" - "go.step.sm/crypto/x509util" ) const customIntermediateTemplate = `{ diff --git a/command/certificate/verify.go b/command/certificate/verify.go index b17102cb..81e34706 100644 --- a/command/certificate/verify.go +++ b/command/certificate/verify.go @@ -11,12 +11,14 @@ import ( "os" "github.com/pkg/errors" + "github.com/urfave/cli" + "golang.org/x/crypto/ocsp" + + "github.com/smallstep/cli-utils/errs" + "go.step.sm/crypto/x509util" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/internal/crlutil" - "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" - "go.step.sm/crypto/x509util" - "golang.org/x/crypto/ocsp" ) func verifyCommand() cli.Command { diff --git a/command/completion/completion.go b/command/completion/completion.go index 54fa194e..55edfa2b 100644 --- a/command/completion/completion.go +++ b/command/completion/completion.go @@ -4,10 +4,12 @@ import ( "fmt" "github.com/pkg/errors" - "github.com/smallstep/cli/flags" "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" + + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + + "github.com/smallstep/cli/flags" ) func init() { diff --git a/command/context/context.go b/command/context/context.go index a6c11556..9adca660 100644 --- a/command/context/context.go +++ b/command/context/context.go @@ -2,7 +2,8 @@ package context import ( "github.com/urfave/cli" - "go.step.sm/cli-utils/command" + + "github.com/smallstep/cli-utils/command" ) // init creates and registers the ca command diff --git a/command/context/current.go b/command/context/current.go index 96c41fb7..fdda33ee 100644 --- a/command/context/current.go +++ b/command/context/current.go @@ -5,10 +5,12 @@ import ( "fmt" "github.com/pkg/errors" - "github.com/smallstep/cli/flags" "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/step" + + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/step" + + "github.com/smallstep/cli/flags" ) func currentCommand() cli.Command { diff --git a/command/context/list.go b/command/context/list.go index 33803cc5..2d0e585e 100644 --- a/command/context/list.go +++ b/command/context/list.go @@ -3,10 +3,12 @@ package context import ( "fmt" - "github.com/smallstep/cli/flags" "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/step" + + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/step" + + "github.com/smallstep/cli/flags" ) func listCommand() cli.Command { diff --git a/command/context/remove.go b/command/context/remove.go index c047d31c..c0c93eac 100644 --- a/command/context/remove.go +++ b/command/context/remove.go @@ -6,13 +6,15 @@ import ( "path/filepath" "github.com/pkg/errors" - "github.com/smallstep/cli/flags" "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/fileutil" - "go.step.sm/cli-utils/step" - "go.step.sm/cli-utils/ui" + + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/fileutil" + "github.com/smallstep/cli-utils/step" + "github.com/smallstep/cli-utils/ui" + + "github.com/smallstep/cli/flags" ) func removeCommand() cli.Command { diff --git a/command/context/select.go b/command/context/select.go index 03a8639a..731ef464 100644 --- a/command/context/select.go +++ b/command/context/select.go @@ -1,12 +1,14 @@ package context import ( - "github.com/smallstep/cli/flags" "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/step" - "go.step.sm/cli-utils/ui" + + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/step" + "github.com/smallstep/cli-utils/ui" + + "github.com/smallstep/cli/flags" ) func selectCommand() cli.Command { diff --git a/command/crl/crl.go b/command/crl/crl.go index 1c5530f2..0e592fe9 100644 --- a/command/crl/crl.go +++ b/command/crl/crl.go @@ -2,7 +2,8 @@ package crl import ( "github.com/urfave/cli" - "go.step.sm/cli-utils/command" + + "github.com/smallstep/cli-utils/command" ) // init creates and registers the crl command diff --git a/command/crl/inspect.go b/command/crl/inspect.go index 27f747f6..ece9b694 100644 --- a/command/crl/inspect.go +++ b/command/crl/inspect.go @@ -14,14 +14,16 @@ import ( "strings" "github.com/pkg/errors" + "github.com/urfave/cli" + + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "go.step.sm/crypto/pemutil" + "go.step.sm/crypto/x509util" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/internal/crlutil" "github.com/smallstep/cli/utils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" - "go.step.sm/crypto/pemutil" - "go.step.sm/crypto/x509util" ) func inspectCommand() cli.Command { diff --git a/command/crypto/change-pass.go b/command/crypto/change-pass.go index e47f51c2..92c41945 100644 --- a/command/crypto/change-pass.go +++ b/command/crypto/change-pass.go @@ -7,14 +7,16 @@ import ( "os" "github.com/pkg/errors" - "github.com/smallstep/cli/flags" - "github.com/smallstep/cli/utils" "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" + + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" "go.step.sm/crypto/jose" "go.step.sm/crypto/pemutil" + + "github.com/smallstep/cli/flags" + "github.com/smallstep/cli/utils" ) func changePassCommand() cli.Command { diff --git a/command/crypto/crypto.go b/command/crypto/crypto.go index f150b00a..45cd43bb 100644 --- a/command/crypto/crypto.go +++ b/command/crypto/crypto.go @@ -1,6 +1,10 @@ package crypto import ( + "github.com/urfave/cli" + + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli/command/crypto/hash" "github.com/smallstep/cli/command/crypto/jose" "github.com/smallstep/cli/command/crypto/jwe" @@ -13,8 +17,6 @@ import ( "github.com/smallstep/cli/command/crypto/otp" "github.com/smallstep/cli/command/crypto/rand" "github.com/smallstep/cli/command/crypto/winpe" - "github.com/urfave/cli" - "go.step.sm/cli-utils/command" ) func init() { diff --git a/command/crypto/hash/hash.go b/command/crypto/hash/hash.go index c57e5406..0c997adb 100644 --- a/command/crypto/hash/hash.go +++ b/command/crypto/hash/hash.go @@ -18,9 +18,11 @@ import ( "strings" "github.com/pkg/errors" - "github.com/smallstep/cli/flags" "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" + + "github.com/smallstep/cli-utils/errs" + + "github.com/smallstep/cli/flags" ) type hashConstructor func() hash.Hash diff --git a/command/crypto/jwe/decrypt.go b/command/crypto/jwe/decrypt.go index 960a29f5..8d11e91c 100644 --- a/command/crypto/jwe/decrypt.go +++ b/command/crypto/jwe/decrypt.go @@ -4,13 +4,14 @@ import ( "fmt" "os" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" - "github.com/pkg/errors" - "github.com/smallstep/cli/utils" "github.com/urfave/cli" + + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" "go.step.sm/crypto/jose" + + "github.com/smallstep/cli/utils" ) func decryptCommand() cli.Command { diff --git a/command/crypto/jwe/encrypt.go b/command/crypto/jwe/encrypt.go index f0fd7fad..a5e73beb 100644 --- a/command/crypto/jwe/encrypt.go +++ b/command/crypto/jwe/encrypt.go @@ -5,12 +5,14 @@ import ( "os" "github.com/pkg/errors" + "github.com/urfave/cli" + + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" + "go.step.sm/crypto/jose" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/utils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" - "go.step.sm/crypto/jose" ) func encryptCommand() cli.Command { diff --git a/command/crypto/jwk/create.go b/command/crypto/jwk/create.go index 090bbb3b..122caf72 100644 --- a/command/crypto/jwk/create.go +++ b/command/crypto/jwk/create.go @@ -9,15 +9,17 @@ import ( "strconv" "github.com/pkg/errors" - "github.com/smallstep/cli/flags" - "github.com/smallstep/cli/utils" "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" + + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" "go.step.sm/crypto/jose" "go.step.sm/crypto/keyutil" "go.step.sm/crypto/randutil" + + "github.com/smallstep/cli/flags" + "github.com/smallstep/cli/utils" ) const ( diff --git a/command/crypto/jwk/keyset.go b/command/crypto/jwk/keyset.go index d45aa22b..a0e4aa8a 100644 --- a/command/crypto/jwk/keyset.go +++ b/command/crypto/jwk/keyset.go @@ -8,11 +8,13 @@ import ( "syscall" "github.com/pkg/errors" - "github.com/smallstep/cli/utils/sysutils" "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" + + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" "go.step.sm/crypto/jose" + + "github.com/smallstep/cli/utils/sysutils" ) func keysetCommand() cli.Command { diff --git a/command/crypto/jwk/public.go b/command/crypto/jwk/public.go index a3e61e49..349837ff 100644 --- a/command/crypto/jwk/public.go +++ b/command/crypto/jwk/public.go @@ -8,7 +8,8 @@ import ( "github.com/pkg/errors" "github.com/urfave/cli" - "go.step.sm/cli-utils/ui" + + "github.com/smallstep/cli-utils/ui" "go.step.sm/crypto/jose" ) diff --git a/command/crypto/jwk/thumbprint.go b/command/crypto/jwk/thumbprint.go index 6b164012..a91661ad 100644 --- a/command/crypto/jwk/thumbprint.go +++ b/command/crypto/jwk/thumbprint.go @@ -10,7 +10,8 @@ import ( "github.com/pkg/errors" "github.com/urfave/cli" - "go.step.sm/cli-utils/ui" + + "github.com/smallstep/cli-utils/ui" "go.step.sm/crypto/jose" ) diff --git a/command/crypto/jws/inspect.go b/command/crypto/jws/inspect.go index 00d6790a..bae78663 100644 --- a/command/crypto/jws/inspect.go +++ b/command/crypto/jws/inspect.go @@ -8,11 +8,13 @@ import ( "strings" "github.com/pkg/errors" + "github.com/urfave/cli" + + "github.com/smallstep/cli-utils/errs" + "go.step.sm/crypto/jose" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/utils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" - "go.step.sm/crypto/jose" ) func inspectCommand() cli.Command { diff --git a/command/crypto/jws/sign.go b/command/crypto/jws/sign.go index 2f284f58..b5ae0e55 100644 --- a/command/crypto/jws/sign.go +++ b/command/crypto/jws/sign.go @@ -9,7 +9,8 @@ import ( "github.com/pkg/errors" "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" + + "github.com/smallstep/cli-utils/errs" "go.step.sm/crypto/jose" "go.step.sm/crypto/pemutil" ) diff --git a/command/crypto/jws/verify.go b/command/crypto/jws/verify.go index f18a6923..e2c6e1c8 100644 --- a/command/crypto/jws/verify.go +++ b/command/crypto/jws/verify.go @@ -4,11 +4,13 @@ import ( "os" "github.com/pkg/errors" + "github.com/urfave/cli" + + "github.com/smallstep/cli-utils/errs" + "go.step.sm/crypto/jose" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/utils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" - "go.step.sm/crypto/jose" ) func verifyCommand() cli.Command { diff --git a/command/crypto/jwt/inspect.go b/command/crypto/jwt/inspect.go index 7d8724cd..a6f68aac 100644 --- a/command/crypto/jwt/inspect.go +++ b/command/crypto/jwt/inspect.go @@ -8,10 +8,12 @@ import ( "strings" "github.com/pkg/errors" - "github.com/smallstep/cli/utils" "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" + + "github.com/smallstep/cli-utils/errs" "go.step.sm/crypto/jose" + + "github.com/smallstep/cli/utils" ) func inspectCommand() cli.Command { diff --git a/command/crypto/jwt/sign.go b/command/crypto/jwt/sign.go index 9b6a4c4c..145272a8 100644 --- a/command/crypto/jwt/sign.go +++ b/command/crypto/jwt/sign.go @@ -10,12 +10,14 @@ import ( "time" "github.com/pkg/errors" - "github.com/smallstep/cli/flags" "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" + + "github.com/smallstep/cli-utils/errs" "go.step.sm/crypto/jose" "go.step.sm/crypto/pemutil" "go.step.sm/crypto/randutil" + + "github.com/smallstep/cli/flags" ) func signCommand() cli.Command { diff --git a/command/crypto/jwt/verify.go b/command/crypto/jwt/verify.go index 60ebc9fa..3d91ea16 100644 --- a/command/crypto/jwt/verify.go +++ b/command/crypto/jwt/verify.go @@ -7,11 +7,13 @@ import ( "time" "github.com/pkg/errors" + "github.com/urfave/cli" + + "github.com/smallstep/cli-utils/errs" + "go.step.sm/crypto/jose" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/utils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" - "go.step.sm/crypto/jose" ) func verifyCommand() cli.Command { diff --git a/command/crypto/kdf/kdf.go b/command/crypto/kdf/kdf.go index 0251cbb2..a6c3c78b 100644 --- a/command/crypto/kdf/kdf.go +++ b/command/crypto/kdf/kdf.go @@ -4,11 +4,13 @@ import ( "fmt" "github.com/pkg/errors" + "github.com/urfave/cli" + + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/internal/kdf" "github.com/smallstep/cli/utils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" ) // Command returns the cli.Command for kdf and related subcommands. diff --git a/command/crypto/key/fingerprint.go b/command/crypto/key/fingerprint.go index ea703d1d..e4b234fd 100644 --- a/command/crypto/key/fingerprint.go +++ b/command/crypto/key/fingerprint.go @@ -13,13 +13,15 @@ import ( _ "crypto/sha1" "github.com/pkg/errors" - "github.com/smallstep/cli/flags" - "github.com/smallstep/cli/utils" "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" + + "github.com/smallstep/cli-utils/errs" "go.step.sm/crypto/fingerprint" "go.step.sm/crypto/pemutil" "golang.org/x/crypto/ssh" + + "github.com/smallstep/cli/flags" + "github.com/smallstep/cli/utils" ) func fingerprintCommand() cli.Command { diff --git a/command/crypto/key/format.go b/command/crypto/key/format.go index f22a1cd8..2b3f8a3f 100644 --- a/command/crypto/key/format.go +++ b/command/crypto/key/format.go @@ -11,14 +11,16 @@ import ( "os" "github.com/pkg/errors" - "github.com/smallstep/cli/flags" - "github.com/smallstep/cli/utils" "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" + + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" "go.step.sm/crypto/jose" "go.step.sm/crypto/pemutil" "golang.org/x/crypto/ssh" + + "github.com/smallstep/cli/flags" + "github.com/smallstep/cli/utils" ) func formatCommand() cli.Command { diff --git a/command/crypto/key/inspect.go b/command/crypto/key/inspect.go index 04693555..40f5d1f2 100644 --- a/command/crypto/key/inspect.go +++ b/command/crypto/key/inspect.go @@ -9,11 +9,13 @@ import ( "math/big" "github.com/pkg/errors" - "github.com/smallstep/cli/utils" "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" + + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" "go.step.sm/crypto/pemutil" + + "github.com/smallstep/cli/utils" ) func inspectCommand() cli.Command { diff --git a/command/crypto/key/public.go b/command/crypto/key/public.go index 67095684..40b6fb22 100644 --- a/command/crypto/key/public.go +++ b/command/crypto/key/public.go @@ -4,14 +4,16 @@ import ( "encoding/pem" "os" - "github.com/smallstep/cli/flags" - "github.com/smallstep/cli/utils" "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" + + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" "go.step.sm/crypto/keyutil" "go.step.sm/crypto/pemutil" + + "github.com/smallstep/cli/flags" + "github.com/smallstep/cli/utils" ) func publicCommand() cli.Command { diff --git a/command/crypto/key/sign.go b/command/crypto/key/sign.go index 5c976bc4..10fb3982 100644 --- a/command/crypto/key/sign.go +++ b/command/crypto/key/sign.go @@ -13,11 +13,13 @@ import ( "strings" "github.com/pkg/errors" - "github.com/smallstep/cli/utils" "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" + + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" "go.step.sm/crypto/pemutil" + + "github.com/smallstep/cli/utils" ) var hashAlgFlag = cli.StringFlag{ diff --git a/command/crypto/key/verify.go b/command/crypto/key/verify.go index 790e77fa..a10b6f6e 100644 --- a/command/crypto/key/verify.go +++ b/command/crypto/key/verify.go @@ -10,11 +10,13 @@ import ( "fmt" "github.com/pkg/errors" - "github.com/smallstep/cli/utils" "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" + + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" "go.step.sm/crypto/pemutil" + + "github.com/smallstep/cli/utils" ) func verifyCommand() cli.Command { diff --git a/command/crypto/keypair.go b/command/crypto/keypair.go index 3129e24d..332259f1 100644 --- a/command/crypto/keypair.go +++ b/command/crypto/keypair.go @@ -2,15 +2,17 @@ package crypto import ( "github.com/pkg/errors" - "github.com/smallstep/cli/flags" - "github.com/smallstep/cli/utils" "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" + + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" "go.step.sm/crypto/jose" "go.step.sm/crypto/keyutil" "go.step.sm/crypto/pemutil" + + "github.com/smallstep/cli/flags" + "github.com/smallstep/cli/utils" ) func createKeyPairCommand() cli.Command { diff --git a/command/crypto/nacl/auth.go b/command/crypto/nacl/auth.go index 15fdf71d..41601cd9 100644 --- a/command/crypto/nacl/auth.go +++ b/command/crypto/nacl/auth.go @@ -6,10 +6,12 @@ import ( "os" "github.com/pkg/errors" - "github.com/smallstep/cli/utils" "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" "golang.org/x/crypto/nacl/auth" + + "github.com/smallstep/cli-utils/errs" + + "github.com/smallstep/cli/utils" ) func authCommand() cli.Command { diff --git a/command/crypto/nacl/box.go b/command/crypto/nacl/box.go index a07bd0d7..10671c74 100644 --- a/command/crypto/nacl/box.go +++ b/command/crypto/nacl/box.go @@ -6,13 +6,15 @@ import ( "os" "github.com/pkg/errors" + "github.com/urfave/cli" + "golang.org/x/crypto/nacl/box" + + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/utils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" - "golang.org/x/crypto/nacl/box" ) func boxCommand() cli.Command { diff --git a/command/crypto/nacl/secretbox.go b/command/crypto/nacl/secretbox.go index cb69d04c..50a9be36 100644 --- a/command/crypto/nacl/secretbox.go +++ b/command/crypto/nacl/secretbox.go @@ -5,10 +5,12 @@ import ( "os" "github.com/pkg/errors" - "github.com/smallstep/cli/utils" "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" "golang.org/x/crypto/nacl/secretbox" + + "github.com/smallstep/cli-utils/errs" + + "github.com/smallstep/cli/utils" ) func secretboxCommand() cli.Command { diff --git a/command/crypto/nacl/sign.go b/command/crypto/nacl/sign.go index ddb1080a..f48cd6c6 100644 --- a/command/crypto/nacl/sign.go +++ b/command/crypto/nacl/sign.go @@ -6,13 +6,15 @@ import ( "os" "github.com/pkg/errors" + "github.com/urfave/cli" + "golang.org/x/crypto/nacl/sign" + + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/utils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" - "golang.org/x/crypto/nacl/sign" ) func signCommand() cli.Command { diff --git a/command/crypto/otp/generate.go b/command/crypto/otp/generate.go index ca53338a..821597b8 100644 --- a/command/crypto/otp/generate.go +++ b/command/crypto/otp/generate.go @@ -8,11 +8,13 @@ import ( "github.com/pquerna/otp" "github.com/pquerna/otp/totp" + "github.com/urfave/cli" + + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/utils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" ) func generateCommand() cli.Command { diff --git a/command/crypto/otp/verify.go b/command/crypto/otp/verify.go index df41ef73..8ddb4647 100644 --- a/command/crypto/otp/verify.go +++ b/command/crypto/otp/verify.go @@ -11,10 +11,12 @@ import ( "github.com/pkg/errors" "github.com/pquerna/otp" "github.com/pquerna/otp/totp" + "github.com/urfave/cli" + + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/utils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" ) func verifyCommand() cli.Command { diff --git a/command/crypto/rand/rand.go b/command/crypto/rand/rand.go index de8b9faa..c115552b 100644 --- a/command/crypto/rand/rand.go +++ b/command/crypto/rand/rand.go @@ -10,8 +10,10 @@ import ( "strings" "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" + + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "go.step.sm/crypto/fingerprint" "go.step.sm/crypto/randutil" ) diff --git a/command/crypto/winpe/winpe.go b/command/crypto/winpe/winpe.go index 2da226eb..2c10ef99 100644 --- a/command/crypto/winpe/winpe.go +++ b/command/crypto/winpe/winpe.go @@ -12,7 +12,8 @@ import ( "github.com/pkg/errors" "github.com/urfave/cli" "go.mozilla.org/pkcs7" - "go.step.sm/cli-utils/errs" + + "github.com/smallstep/cli-utils/errs" ) // Command returns the winpe subcommand. diff --git a/command/fileserver/fileserver.go b/command/fileserver/fileserver.go index 76f18288..70ff2c5b 100644 --- a/command/fileserver/fileserver.go +++ b/command/fileserver/fileserver.go @@ -16,11 +16,12 @@ import ( "syscall" "time" - "github.com/smallstep/cli/utils" "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + + "github.com/smallstep/cli/utils" ) func init() { diff --git a/command/oauth/cmd.go b/command/oauth/cmd.go index b1ad5338..5651b27a 100644 --- a/command/oauth/cmd.go +++ b/command/oauth/cmd.go @@ -20,14 +20,16 @@ import ( "time" "github.com/pkg/errors" + "github.com/urfave/cli" + + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "go.step.sm/crypto/jose" + "go.step.sm/crypto/randutil" + "github.com/smallstep/cli/exec" "github.com/smallstep/cli/flags" "github.com/smallstep/cli/utils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" - "go.step.sm/crypto/jose" - "go.step.sm/crypto/randutil" ) // These are the OAuth2.0 client IDs from the Step CLI. This application is diff --git a/command/path/path.go b/command/path/path.go index 5a9b25d9..47442bfc 100644 --- a/command/path/path.go +++ b/command/path/path.go @@ -4,8 +4,9 @@ import ( "fmt" "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/step" + + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/step" ) func init() { diff --git a/command/ssh/certificate.go b/command/ssh/certificate.go index 973779e7..3e67dfb0 100644 --- a/command/ssh/certificate.go +++ b/command/ssh/certificate.go @@ -11,22 +11,24 @@ import ( "github.com/google/uuid" "github.com/pkg/errors" + "github.com/urfave/cli" + "golang.org/x/crypto/blake2b" + "golang.org/x/crypto/ssh" + "github.com/smallstep/certificates/api" "github.com/smallstep/certificates/authority/provisioner" "github.com/smallstep/certificates/ca" "github.com/smallstep/certificates/ca/identity" + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" + "go.step.sm/crypto/keyutil" + "go.step.sm/crypto/pemutil" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/internal/sshutil" "github.com/smallstep/cli/utils" "github.com/smallstep/cli/utils/cautils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" - "go.step.sm/crypto/keyutil" - "go.step.sm/crypto/pemutil" - "golang.org/x/crypto/blake2b" - "golang.org/x/crypto/ssh" ) func certificateCommand() cli.Command { diff --git a/command/ssh/checkHost.go b/command/ssh/checkHost.go index 0d9d6b4a..7a7ad45d 100644 --- a/command/ssh/checkHost.go +++ b/command/ssh/checkHost.go @@ -7,15 +7,17 @@ import ( "time" "github.com/pkg/errors" + "github.com/urfave/cli" + "github.com/smallstep/certificates/ca" caErrs "github.com/smallstep/certificates/errs" + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "go.step.sm/crypto/jose" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/token" "github.com/smallstep/cli/utils/cautils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" - "go.step.sm/crypto/jose" ) func checkHostCommand() cli.Command { diff --git a/command/ssh/config.go b/command/ssh/config.go index 25c587f8..451cd2ef 100644 --- a/command/ssh/config.go +++ b/command/ssh/config.go @@ -8,19 +8,21 @@ import ( "strings" "github.com/pkg/errors" + "github.com/urfave/cli" + "github.com/smallstep/certificates/api" "github.com/smallstep/certificates/authority/provisioner" "github.com/smallstep/certificates/ca" "github.com/smallstep/certificates/templates" + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/step" + "github.com/smallstep/cli-utils/ui" + "golang.org/x/crypto/ssh" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/internal/sshutil" "github.com/smallstep/cli/utils/cautils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/step" - "go.step.sm/cli-utils/ui" - "golang.org/x/crypto/ssh" ) func configCommand() cli.Command { diff --git a/command/ssh/fingerprint.go b/command/ssh/fingerprint.go index 477a2035..96a7e11c 100644 --- a/command/ssh/fingerprint.go +++ b/command/ssh/fingerprint.go @@ -3,11 +3,13 @@ package ssh import ( "fmt" + "github.com/urfave/cli" + + "github.com/smallstep/cli-utils/errs" + "go.step.sm/crypto/sshutil" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/utils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" - "go.step.sm/crypto/sshutil" ) func fingerPrintCommand() cli.Command { diff --git a/command/ssh/hosts.go b/command/ssh/hosts.go index a0ded021..7440cfcb 100644 --- a/command/ssh/hosts.go +++ b/command/ssh/hosts.go @@ -5,12 +5,14 @@ import ( "os" "text/tabwriter" + "github.com/urfave/cli" + "github.com/smallstep/certificates/ca" + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/utils/cautils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" ) func hostsCommand() cli.Command { diff --git a/command/ssh/inspect.go b/command/ssh/inspect.go index 75743395..6391e700 100644 --- a/command/ssh/inspect.go +++ b/command/ssh/inspect.go @@ -8,12 +8,14 @@ import ( "os" "github.com/pkg/errors" + "github.com/urfave/cli" + "golang.org/x/crypto/ssh" + + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli/internal/sshutil" "github.com/smallstep/cli/utils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" - "golang.org/x/crypto/ssh" ) func inspectCommand() cli.Command { diff --git a/command/ssh/list.go b/command/ssh/list.go index dc1df3ee..3067a747 100644 --- a/command/ssh/list.go +++ b/command/ssh/list.go @@ -4,11 +4,14 @@ import ( "fmt" "github.com/pkg/errors" - "github.com/smallstep/cli/internal/sshutil" "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" + + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + libsshutil "go.step.sm/crypto/sshutil" + + "github.com/smallstep/cli/internal/sshutil" ) func listCommand() cli.Command { diff --git a/command/ssh/login.go b/command/ssh/login.go index 01674440..8eda7acd 100644 --- a/command/ssh/login.go +++ b/command/ssh/login.go @@ -5,19 +5,21 @@ import ( "time" "github.com/pkg/errors" + "github.com/urfave/cli" + "golang.org/x/crypto/ssh" + "github.com/smallstep/certificates/api" "github.com/smallstep/certificates/authority/provisioner" "github.com/smallstep/certificates/ca" + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" + "go.step.sm/crypto/keyutil" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/internal/sshutil" "github.com/smallstep/cli/utils" "github.com/smallstep/cli/utils/cautils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" - "go.step.sm/crypto/keyutil" - "golang.org/x/crypto/ssh" ) func loginCommand() cli.Command { diff --git a/command/ssh/logout.go b/command/ssh/logout.go index a7054b61..1726fc40 100644 --- a/command/ssh/logout.go +++ b/command/ssh/logout.go @@ -4,13 +4,15 @@ import ( "fmt" "github.com/pkg/errors" + "github.com/urfave/cli" + "golang.org/x/crypto/ssh" + + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/internal/sshutil" "github.com/smallstep/cli/utils/cautils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" - "golang.org/x/crypto/ssh" ) func logoutCommand() cli.Command { diff --git a/command/ssh/needsRenewal.go b/command/ssh/needsRenewal.go index f53b5e41..4145e9ab 100644 --- a/command/ssh/needsRenewal.go +++ b/command/ssh/needsRenewal.go @@ -8,11 +8,13 @@ import ( "time" "github.com/pkg/errors" + "github.com/urfave/cli" + "golang.org/x/crypto/ssh" + + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli/internal/sshutil" "github.com/smallstep/cli/utils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" - "golang.org/x/crypto/ssh" ) const defaultPercentUsedThreshold = 66 diff --git a/command/ssh/proxycommand.go b/command/ssh/proxycommand.go index 159ed178..fe35cf18 100644 --- a/command/ssh/proxycommand.go +++ b/command/ssh/proxycommand.go @@ -10,18 +10,20 @@ import ( "time" "github.com/pkg/errors" + "github.com/urfave/cli" + "golang.org/x/crypto/ssh" + "github.com/smallstep/certificates/api" "github.com/smallstep/certificates/authority/provisioner" "github.com/smallstep/certificates/ca" + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "go.step.sm/crypto/keyutil" + "github.com/smallstep/cli/exec" "github.com/smallstep/cli/flags" "github.com/smallstep/cli/internal/sshutil" "github.com/smallstep/cli/utils/cautils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" - "go.step.sm/crypto/keyutil" - "golang.org/x/crypto/ssh" ) const sshDefaultPath = "/usr/bin/ssh" diff --git a/command/ssh/rekey.go b/command/ssh/rekey.go index d8ed9277..e9278cc2 100644 --- a/command/ssh/rekey.go +++ b/command/ssh/rekey.go @@ -5,19 +5,22 @@ import ( "strconv" "github.com/pkg/errors" + "github.com/urfave/cli" + "golang.org/x/crypto/ssh" + "github.com/smallstep/certificates/api" "github.com/smallstep/certificates/authority/provisioner" "github.com/smallstep/certificates/ca/identity" + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" + + "go.step.sm/crypto/keyutil" + "go.step.sm/crypto/pemutil" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/utils" "github.com/smallstep/cli/utils/cautils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" - "go.step.sm/crypto/keyutil" - "go.step.sm/crypto/pemutil" - "golang.org/x/crypto/ssh" ) func rekeyCommand() cli.Command { diff --git a/command/ssh/renew.go b/command/ssh/renew.go index 36c95feb..5d77e168 100644 --- a/command/ssh/renew.go +++ b/command/ssh/renew.go @@ -4,19 +4,20 @@ import ( "os" "strconv" - "github.com/smallstep/certificates/ca/identity" - "github.com/pkg/errors" + "github.com/urfave/cli" + "golang.org/x/crypto/ssh" + "github.com/smallstep/certificates/api" "github.com/smallstep/certificates/authority/provisioner" + "github.com/smallstep/certificates/ca/identity" + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/utils" "github.com/smallstep/cli/utils/cautils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" - "golang.org/x/crypto/ssh" ) func renewCommand() cli.Command { diff --git a/command/ssh/revoke.go b/command/ssh/revoke.go index 251d285e..5944abb2 100644 --- a/command/ssh/revoke.go +++ b/command/ssh/revoke.go @@ -5,17 +5,19 @@ import ( "strconv" "github.com/pkg/errors" + "github.com/urfave/cli" + "golang.org/x/crypto/ssh" + "github.com/smallstep/certificates/api" "github.com/smallstep/certificates/authority/provisioner" "github.com/smallstep/certificates/ca" + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" + cmdca "github.com/smallstep/cli/command/ca" "github.com/smallstep/cli/flags" "github.com/smallstep/cli/utils/cautils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" - "golang.org/x/crypto/ssh" ) func revokeCommand() cli.Command { diff --git a/command/ssh/ssh.go b/command/ssh/ssh.go index 3fcadb47..45ef90f0 100644 --- a/command/ssh/ssh.go +++ b/command/ssh/ssh.go @@ -5,19 +5,21 @@ import ( "strings" "github.com/pkg/errors" + "github.com/urfave/cli" + "golang.org/x/crypto/ssh" + "github.com/smallstep/certificates/api" "github.com/smallstep/certificates/authority/provisioner" "github.com/smallstep/certificates/ca" "github.com/smallstep/certificates/errs" + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/ui" + "go.step.sm/crypto/keyutil" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/internal/sshutil" "github.com/smallstep/cli/token" "github.com/smallstep/cli/utils/cautils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/ui" - "go.step.sm/crypto/keyutil" - "golang.org/x/crypto/ssh" ) // init creates and registers the ssh command diff --git a/command/version/version.go b/command/version/version.go index 39d9c01f..11874ad3 100644 --- a/command/version/version.go +++ b/command/version/version.go @@ -3,11 +3,12 @@ package version import ( "fmt" - "github.com/smallstep/cli/flags" "github.com/urfave/cli" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/step" + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/step" + + "github.com/smallstep/cli/flags" ) func init() { diff --git a/flags/flags.go b/flags/flags.go index a344d0a8..6275b191 100644 --- a/flags/flags.go +++ b/flags/flags.go @@ -10,12 +10,14 @@ import ( "time" "github.com/pkg/errors" - "github.com/smallstep/certificates/api" - "github.com/smallstep/cli/utils" "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/step" + + "github.com/smallstep/certificates/api" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/step" "go.step.sm/crypto/fingerprint" + + "github.com/smallstep/cli/utils" ) var ( diff --git a/go.mod b/go.mod index a116ab6a..76e9cf11 100644 --- a/go.mod +++ b/go.mod @@ -18,6 +18,7 @@ require ( github.com/smallstep/assert v0.0.0-20200723003110-82e2b9b3b262 github.com/smallstep/certificates v0.27.4 github.com/smallstep/certinfo v1.12.2 + github.com/smallstep/cli-utils v0.10.0 github.com/smallstep/go-attestation v0.4.4-0.20240109183208-413678f90935 github.com/smallstep/truststore v0.13.0 github.com/smallstep/zcrypto v0.0.0-20221001003018-1ab2364d2a91 diff --git a/go.sum b/go.sum index d8061053..735b6864 100644 --- a/go.sum +++ b/go.sum @@ -328,6 +328,8 @@ github.com/smallstep/certificates v0.27.4 h1:U/md0T1clj88SUL9d2i0DthOGvEzTULbqVR github.com/smallstep/certificates v0.27.4/go.mod h1:VEZuWd4KTmdSUpkwjeB42u/T4Z8D0blzbZpvDDd+WME= github.com/smallstep/certinfo v1.12.2 h1:cuyiPNo86yekliQduAGP/5BDR4JA/8S1UCtDtpKl8fQ= github.com/smallstep/certinfo v1.12.2/go.mod h1:J8E+AF8ZPEaCqG+eM3gAKGGfo7Zb9DSghjf9VG96x/0= +github.com/smallstep/cli-utils v0.10.0 h1:CfXNvHtIN5pAzGvGP0NEUZoGFcj5epNEB6RSpSfduek= +github.com/smallstep/cli-utils v0.10.0/go.mod h1:jIeNa5ctrVg89lU5TaQKYd6o1eFxi9mtZu1sXSxpEBg= github.com/smallstep/go-attestation v0.4.4-0.20240109183208-413678f90935 h1:kjYvkvS/Wdy0PVRDUAA0gGJIVSEZYhiAJtfwYgOYoGA= github.com/smallstep/go-attestation v0.4.4-0.20240109183208-413678f90935/go.mod h1:vNAduivU014fubg6ewygkAvQC0IQVXqdc8vaGl/0er4= github.com/smallstep/nosql v0.7.0 h1:YiWC9ZAHcrLCrayfaF+QJUv16I2bZ7KdLC3RpJcnAnE= diff --git a/integration/help_quality_test.go b/integration/help_quality_test.go index ca577ae9..c3017387 100644 --- a/integration/help_quality_test.go +++ b/integration/help_quality_test.go @@ -12,7 +12,7 @@ import ( "testing" "github.com/smallstep/assert" - "go.step.sm/cli-utils/usage" + "github.com/smallstep/cli-utils/usage" ) func TestHelpQuality(t *testing.T) { diff --git a/internal/plugin/plugin.go b/internal/plugin/plugin.go index 4bd9e2d6..00610525 100644 --- a/internal/plugin/plugin.go +++ b/internal/plugin/plugin.go @@ -8,7 +8,8 @@ import ( "strings" "github.com/urfave/cli" - "go.step.sm/cli-utils/step" + + "github.com/smallstep/cli-utils/step" ) // LookPath searches for an executable named step--plugin in the $(step diff --git a/internal/sshutil/shell.go b/internal/sshutil/shell.go index 0d496673..81e925a5 100644 --- a/internal/sshutil/shell.go +++ b/internal/sshutil/shell.go @@ -9,10 +9,11 @@ import ( "strings" "github.com/pkg/errors" - "go.step.sm/cli-utils/step" "golang.org/x/crypto/ssh" "golang.org/x/crypto/ssh/knownhosts" "golang.org/x/term" + + "github.com/smallstep/cli-utils/step" ) // ProxyCommand replaces %%, %h, %p, and %r in the given command. diff --git a/utils/cautils/acme_flow.go b/utils/cautils/acme_flow.go index 318c2f42..1549a496 100644 --- a/utils/cautils/acme_flow.go +++ b/utils/cautils/acme_flow.go @@ -5,7 +5,8 @@ import ( "github.com/pkg/errors" "github.com/urfave/cli" - "go.step.sm/cli-utils/ui" + + "github.com/smallstep/cli-utils/ui" "go.step.sm/crypto/pemutil" ) diff --git a/utils/cautils/acmeutils.go b/utils/cautils/acmeutils.go index c7e1bc60..66025d30 100644 --- a/utils/cautils/acmeutils.go +++ b/utils/cautils/acmeutils.go @@ -26,18 +26,18 @@ import ( "github.com/pkg/errors" "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" + "github.com/smallstep/certificates/acme" + acmeAPI "github.com/smallstep/certificates/acme/api" + "github.com/smallstep/certificates/ca" + "github.com/smallstep/certificates/pki" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" "go.step.sm/crypto/jose" "go.step.sm/crypto/keyutil" "go.step.sm/crypto/pemutil" "go.step.sm/crypto/tpm" tpmstorage "go.step.sm/crypto/tpm/storage" - "github.com/smallstep/certificates/acme" - acmeAPI "github.com/smallstep/certificates/acme/api" - "github.com/smallstep/certificates/ca" - "github.com/smallstep/certificates/pki" "github.com/smallstep/cli/flags" "github.com/smallstep/cli/internal/cryptoutil" "github.com/smallstep/cli/utils" diff --git a/utils/cautils/bootstrap.go b/utils/cautils/bootstrap.go index 1bf33bc2..fd375425 100644 --- a/utils/cautils/bootstrap.go +++ b/utils/cautils/bootstrap.go @@ -11,15 +11,17 @@ import ( "strings" "github.com/pkg/errors" + "github.com/urfave/cli" + "github.com/smallstep/certificates/ca" "github.com/smallstep/certificates/pki" - "github.com/smallstep/cli/utils" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/step" + "github.com/smallstep/cli-utils/ui" "github.com/smallstep/truststore" - "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/step" - "go.step.sm/cli-utils/ui" "go.step.sm/crypto/pemutil" + + "github.com/smallstep/cli/utils" ) type bootstrapAPIResponse struct { diff --git a/utils/cautils/certificate_flow.go b/utils/cautils/certificate_flow.go index 8199e2ed..8403ef8e 100644 --- a/utils/cautils/certificate_flow.go +++ b/utils/cautils/certificate_flow.go @@ -14,20 +14,22 @@ import ( "time" "github.com/pkg/errors" + "github.com/urfave/cli" + "golang.org/x/crypto/ssh" + "github.com/smallstep/certificates/api" "github.com/smallstep/certificates/authority/provisioner" "github.com/smallstep/certificates/ca" "github.com/smallstep/certificates/pki" - "github.com/smallstep/cli/flags" - "github.com/smallstep/cli/token" - "github.com/smallstep/cli/utils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" "go.step.sm/crypto/keyutil" "go.step.sm/crypto/pemutil" "go.step.sm/crypto/x509util" - "golang.org/x/crypto/ssh" + + "github.com/smallstep/cli/flags" + "github.com/smallstep/cli/token" + "github.com/smallstep/cli/utils" ) // CertificateFlow manages the flow to retrieve a new certificate. diff --git a/utils/cautils/client.go b/utils/cautils/client.go index 8569e8e1..ab66c9f7 100644 --- a/utils/cautils/client.go +++ b/utils/cautils/client.go @@ -9,16 +9,19 @@ import ( "time" "github.com/pkg/errors" + "github.com/urfave/cli" + "github.com/smallstep/certificates/api" "github.com/smallstep/certificates/authority/provisioner" "github.com/smallstep/certificates/ca" "github.com/smallstep/certificates/pki" - "github.com/smallstep/cli/flags" - "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" + "go.step.sm/crypto/keyutil" "go.step.sm/crypto/pemutil" + + "github.com/smallstep/cli/flags" ) // CaClient is the interface implemented by a client used to sign, renew, revoke diff --git a/utils/cautils/token_flow.go b/utils/cautils/token_flow.go index 185d9153..7e02e8c2 100644 --- a/utils/cautils/token_flow.go +++ b/utils/cautils/token_flow.go @@ -7,13 +7,15 @@ import ( "time" "github.com/pkg/errors" + "github.com/urfave/cli" + "github.com/smallstep/certificates/authority/provisioner" "github.com/smallstep/certificates/pki" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" + "github.com/smallstep/cli/flags" "github.com/smallstep/cli/utils" - "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" ) type provisionersSelect struct { diff --git a/utils/cautils/token_generator.go b/utils/cautils/token_generator.go index 71d1b385..8aaaef31 100644 --- a/utils/cautils/token_generator.go +++ b/utils/cautils/token_generator.go @@ -14,18 +14,20 @@ import ( "time" "github.com/pkg/errors" + "github.com/urfave/cli" + "github.com/smallstep/certificates/authority/provisioner" "github.com/smallstep/certificates/pki" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" + "go.step.sm/crypto/jose" + "go.step.sm/crypto/pemutil" + "go.step.sm/crypto/randutil" + "github.com/smallstep/cli/exec" "github.com/smallstep/cli/internal/cryptoutil" "github.com/smallstep/cli/token" "github.com/smallstep/cli/token/provision" - "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" - "go.step.sm/crypto/jose" - "go.step.sm/crypto/pemutil" - "go.step.sm/crypto/randutil" ) // TokenGenerator is a helper used to generate different types of tokens used in diff --git a/utils/cautils/tpm.go b/utils/cautils/tpm.go index 49535c76..d44336cc 100644 --- a/utils/cautils/tpm.go +++ b/utils/cautils/tpm.go @@ -26,14 +26,15 @@ import ( "github.com/smallstep/certificates/acme" "github.com/smallstep/certificates/ca" - "github.com/smallstep/cli/utils" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" "go.step.sm/crypto/jose" "go.step.sm/crypto/keyutil" "go.step.sm/crypto/kms/uri" "go.step.sm/crypto/tpm" tpmstorage "go.step.sm/crypto/tpm/storage" + + "github.com/smallstep/cli/utils" ) func doTPMAttestation(clictx *cli.Context, ac *ca.ACMEClient, ch *acme.Challenge, identifier string, af *acmeFlow) error { diff --git a/utils/cli.go b/utils/cli.go index 3461da36..26966562 100644 --- a/utils/cli.go +++ b/utils/cli.go @@ -4,7 +4,8 @@ import ( "strconv" "github.com/urfave/cli" - "go.step.sm/cli-utils/errs" + + "github.com/smallstep/cli-utils/errs" "go.step.sm/crypto/keyutil" ) diff --git a/utils/file.go b/utils/file.go index b329faa0..90581eba 100644 --- a/utils/file.go +++ b/utils/file.go @@ -3,7 +3,7 @@ package utils import ( "os" - "go.step.sm/cli-utils/errs" + "github.com/smallstep/cli-utils/errs" ) // File represents a wrapper on os.File that supports read, write, seek and diff --git a/utils/read.go b/utils/read.go index 869c7a2c..ca4675de 100644 --- a/utils/read.go +++ b/utils/read.go @@ -9,10 +9,11 @@ import ( "unicode" "github.com/pkg/errors" - "github.com/smallstep/cli/utils/internal/utfbom" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" + + "github.com/smallstep/cli/utils/internal/utfbom" ) // In command line utilities, it is a de facto standard that a hyphen "-" diff --git a/utils/write.go b/utils/write.go index 564eecb0..c18b4b4d 100644 --- a/utils/write.go +++ b/utils/write.go @@ -11,9 +11,9 @@ import ( "github.com/pkg/errors" - "go.step.sm/cli-utils/command" - "go.step.sm/cli-utils/errs" - "go.step.sm/cli-utils/ui" + "github.com/smallstep/cli-utils/command" + "github.com/smallstep/cli-utils/errs" + "github.com/smallstep/cli-utils/ui" ) var (