Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lcd/client: Abstract method for determining when to get passphrase from stdin #1446

Closed
ValarDragon opened this issue Jun 29, 2018 · 3 comments

Comments

@ValarDragon
Copy link
Contributor

ValarDragon commented Jun 29, 2018

Ref: #931 (comment)
Basically change that part of the code to not depend on the hardcoded string "local", and have it be some property of that object. This was moved to an issue so that the ledger PR can be merged in.

@alexanderbez
Copy link
Contributor

Addressing this in #1741

@alexanderbez
Copy link
Contributor

alexanderbez commented Jul 19, 2018

@ValarDragon I've already made that logic enumerated, but having that be part of the type (I call it KeyType) might be difficult because of import cycles. Did you have other thoughts on this?

Right now it's more or less:

// we only need a passphrase for locally stored keys
if keyInfo.GetType() == cryptokeys.TypeLocal {
    passphrase, err = GetPassphraseFromStdin(name)
    if err != nil {
        return fmt.Errorf("Error reading passphrase: %v", err)
    }
}

@jackzampolin
Copy link
Member

Closing this as implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants