Skip to content

Commit

Permalink
crypto/keys: simplify pass keyring directory (cosmos#5852)
Browse files Browse the repository at this point in the history
Store keys into $HOME/.password-store/keyring-appcli
instead of $HOME/.password-store/$HOME/.appcli/.
The latter is very user unfriendly.
  • Loading branch information
Alessio Treglia authored Mar 23, 2020
1 parent 49102b1 commit de3f880
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crypto/keys/keyring.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const (
const (
keyringDirNameFmt = "keyring-%s"
testKeyringDirNameFmt = "keyring-test-%s"
passKeyringPrefix = keyringDirNameFmt
)

var _ Keybase = keyringKeybase{}
Expand Down Expand Up @@ -490,7 +491,7 @@ func newKWalletBackendKeyringConfig(appName, _ string, _ io.Reader) keyring.Conf
}

func newPassBackendKeyringConfig(appName, dir string, _ io.Reader) keyring.Config {
prefix := filepath.Join(dir, fmt.Sprintf(keyringDirNameFmt, appName))
prefix := fmt.Sprintf(passKeyringPrefix, appName)
return keyring.Config{
AllowedBackends: []keyring.BackendType{keyring.PassBackend},
ServiceName: appName,
Expand Down

0 comments on commit de3f880

Please sign in to comment.