mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 11:08:10 +00:00
helper/password: for reading passwords securely
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/hashicorp/vault/helper/password"
|
||||
)
|
||||
|
||||
// UnsealCommand is a Command that unseals the vault.
|
||||
@@ -16,6 +19,12 @@ func (c *UnsealCommand) Run(args []string) int {
|
||||
return 1
|
||||
}
|
||||
|
||||
value, err := password.Read(os.Stdin)
|
||||
if err != nil {
|
||||
return 1
|
||||
}
|
||||
|
||||
c.Ui.Output(value)
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user