diff --git a/client/keys/utils.go b/client/keys/utils.go index 498758d2c7bb..f6cf20e818df 100644 --- a/client/keys/utils.go +++ b/client/keys/utils.go @@ -56,11 +56,11 @@ func NewKeyringFromDir(rootDir string, input io.Reader, opts ...keys.KeybaseOpti keyringBackend := viper.GetString(flags.FlagKeyringBackend) switch keyringBackend { case flags.KeyringBackendTest: - return keys.NewTestKeyring(sdk.GetConfig().GetKeyringServiceName(), rootDir) + return keys.NewTestKeyring(sdk.GetConfig().GetKeyringServiceName(), rootDir, opts...) case flags.KeyringBackendFile: - return keys.NewKeyringFile(sdk.GetConfig().GetKeyringServiceName(), rootDir, input) + return keys.NewKeyringFile(sdk.GetConfig().GetKeyringServiceName(), rootDir, input, opts...) case flags.KeyringBackendOS: - return keys.NewKeyring(sdk.GetConfig().GetKeyringServiceName(), rootDir, input) + return keys.NewKeyring(sdk.GetConfig().GetKeyringServiceName(), rootDir, input, opts...) } return nil, fmt.Errorf("unknown keyring backend %q", keyringBackend) } diff --git a/crypto/keys/keyring.go b/crypto/keys/keyring.go index b7c7aa0daa84..842db588c30f 100644 --- a/crypto/keys/keyring.go +++ b/crypto/keys/keyring.go @@ -56,13 +56,13 @@ func NewKeyring( } // NewKeyringFile creates a new instance of an encrypted file-backed keyring. -func NewKeyringFile(name string, dir string, userInput io.Reader) (Keybase, error) { +func NewKeyringFile(name string, dir string, userInput io.Reader, opts ...KeybaseOption) (Keybase, error) { db, err := keyring.Open(newFileBackendKeyringConfig(name, dir, userInput)) if err != nil { return nil, err } - return newKeyringKeybase(db), nil + return newKeyringKeybase(db, opts...), nil } // NewTestKeyring creates a new instance of an on-disk keyring for