Use smallstep/cli-utils instead of smallstep/cli
This commit is contained in:
parent
fb18e5afc4
commit
40d0596b71
15 changed files with 58 additions and 479 deletions
|
@ -17,8 +17,8 @@ import (
|
|||
|
||||
"github.com/smallstep/certificates/kms/apiv1"
|
||||
"github.com/smallstep/certificates/kms/cloudkms"
|
||||
"github.com/smallstep/cli/ui"
|
||||
"github.com/smallstep/cli/utils"
|
||||
"go.step.sm/cli-utils/fileutil"
|
||||
"go.step.sm/cli-utils/ui"
|
||||
"go.step.sm/crypto/pemutil"
|
||||
"golang.org/x/crypto/ssh"
|
||||
)
|
||||
|
@ -146,7 +146,7 @@ func createPKI(c *cloudkms.CloudKMS, project, location, keyRing string, protecti
|
|||
return err
|
||||
}
|
||||
|
||||
if err = utils.WriteFile("root_ca.crt", pem.EncodeToMemory(&pem.Block{
|
||||
if err = fileutil.WriteFile("root_ca.crt", pem.EncodeToMemory(&pem.Block{
|
||||
Type: "CERTIFICATE",
|
||||
Bytes: b,
|
||||
}), 0600); err != nil {
|
||||
|
@ -190,7 +190,7 @@ func createPKI(c *cloudkms.CloudKMS, project, location, keyRing string, protecti
|
|||
return err
|
||||
}
|
||||
|
||||
if err = utils.WriteFile("intermediate_ca.crt", pem.EncodeToMemory(&pem.Block{
|
||||
if err = fileutil.WriteFile("intermediate_ca.crt", pem.EncodeToMemory(&pem.Block{
|
||||
Type: "CERTIFICATE",
|
||||
Bytes: b,
|
||||
}), 0600); err != nil {
|
||||
|
@ -223,7 +223,7 @@ func createSSH(c *cloudkms.CloudKMS, project, location, keyRing string, protecti
|
|||
return err
|
||||
}
|
||||
|
||||
if err = utils.WriteFile("ssh_user_ca_key.pub", ssh.MarshalAuthorizedKey(key), 0600); err != nil {
|
||||
if err = fileutil.WriteFile("ssh_user_ca_key.pub", ssh.MarshalAuthorizedKey(key), 0600); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
@ -245,7 +245,7 @@ func createSSH(c *cloudkms.CloudKMS, project, location, keyRing string, protecti
|
|||
return err
|
||||
}
|
||||
|
||||
if err = utils.WriteFile("ssh_host_ca_key.pub", ssh.MarshalAuthorizedKey(key), 0600); err != nil {
|
||||
if err = fileutil.WriteFile("ssh_host_ca_key.pub", ssh.MarshalAuthorizedKey(key), 0600); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue