INNER CODE UNIT · Go
askKeyfile
GGP1/kure · auth/auth.go:147
func askKeyfile(r io.Reader) (bool, error) {
if !terminal.Confirm(r, "Would you like to use a key file?") {
return false, nil
}
if config.GetString(keyfilePath) != "" {
if !terminal.Confirm(r, "Would you like to use the path specified in the configuration file?") {
config.Set(keyfilePath, "")
}
}
return true, nil
}
func combineKeys(r io.Reader, password *memguard.Enclave) (*memguard.Enclave, error) {
path := config.GetString(keyfilePath)
if path == "" {
path = terminal.Scanln(bufio.NewReader(r), "Enter key file path")