crypto/keys: simplify pass keyring directory (#5852)

Store keys into $HOME/.password-store/keyring-appcli
instead of $HOME/.password-store/$HOME/.appcli/.
The latter is very user unfriendly.
This commit is contained in:
Alessio Treglia 2020-03-23 16:40:47 +01:00 committed by GitHub
parent 49102b1d98
commit de3f8806f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,6 +34,7 @@ const (
const (
keyringDirNameFmt = "keyring-%s"
testKeyringDirNameFmt = "keyring-test-%s"
passKeyringPrefix = keyringDirNameFmt
)
var _ Keybase = keyringKeybase{}
@ -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,