Skip to content

Commit

Permalink
Merge pull request #393 from smallstep/max/cert-create-no-empty-pass
Browse files Browse the repository at this point in the history
Do not allow empty password in step cert create ...
  • Loading branch information
dopey committed Nov 30, 2020
2 parents df41f64 + 1e2fbb0 commit 7951724
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion command/certificate/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,8 @@ func savePrivateKey(filename string, priv interface{}, insecure bool) error {
}

var pass []byte
pass, err := ui.PromptPassword("Please enter the password to encrypt the private key")
pass, err := ui.PromptPassword("Please enter the password to encrypt the private key",
ui.WithValidateNotEmpty())
if err != nil {
return errors.Wrap(err, "error reading password")
}
Expand Down

0 comments on commit 7951724

Please sign in to comment.