Add missing use of invalid passphrase error

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
This commit is contained in:
Derek McGowan 2015-07-22 04:08:14 -07:00
parent f0912247ed
commit 304afb53d0
1 changed files with 1 additions and 1 deletions

View File

@ -220,7 +220,7 @@ func getKey(s LimitedFileStore, passphraseRetriever passphrase.Retriever, cached
passphrase, giveup, err := passphraseRetriever(name, string(keyAlias), false, attempts) passphrase, giveup, err := passphraseRetriever(name, string(keyAlias), false, attempts)
// Check if the passphrase retriever got an error or if it is telling us to give up // Check if the passphrase retriever got an error or if it is telling us to give up
if giveup || err != nil { if giveup || err != nil {
return nil, "", errors.New("obtaining passphrase failed") return nil, "", ErrPasswordInvalid{}
} }
if attempts > 10 { if attempts > 10 {
return nil, "", errors.New("maximum number of passphrase attempts exceeded") return nil, "", errors.New("maximum number of passphrase attempts exceeded")