mirror of https://github.com/docker/docs.git
improve password challenge messaging when using yubikey
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
This commit is contained in:
parent
bc0c0d4ea1
commit
22244fff65
|
|
@ -125,8 +125,10 @@ func PromptRetrieverWithInOut(in io.Reader, out io.Writer, aliasMap map[string]s
|
|||
|
||||
if createNew {
|
||||
fmt.Fprintf(out, "Enter passphrase for new %s key with id %s: ", displayAlias, keyName)
|
||||
} else if displayAlias == "yubikey" {
|
||||
fmt.Fprintf(out, "Enter the %s for the attached Yubikey: ", keyName)
|
||||
} else {
|
||||
fmt.Fprintf(out, "Enter key passphrase for %s key with id %s: ", displayAlias, keyName)
|
||||
fmt.Fprintf(out, "Enter passphrase for %s key with id %s: ", displayAlias, keyName)
|
||||
}
|
||||
|
||||
passphrase, err := stdin.ReadBytes('\n')
|
||||
|
|
|
|||
|
|
@ -387,7 +387,7 @@ func login(ctx *pkcs11.Ctx, session pkcs11.SessionHandle, passRetriever passphra
|
|||
if userFlag == pkcs11.CKU_SO {
|
||||
user = "SO Pin"
|
||||
} else {
|
||||
user = "Pin"
|
||||
user = "User Pin"
|
||||
}
|
||||
passwd, giveup, err := passRetriever(user, "yubikey", false, attempts)
|
||||
// Check if the passphrase retriever got an error or if it is telling us to give up
|
||||
|
|
|
|||
Loading…
Reference in New Issue