feat: add reloadkeys method

This commit is contained in:
James Houlahan
2020-06-16 11:28:11 +02:00
parent f3e6af5571
commit 9241a9bdbf
10 changed files with 80 additions and 49 deletions

View File

@ -90,8 +90,8 @@ type UserRes struct {
// unlockUser unlocks all the client's user keys using the given passphrase.
func (c *client) unlockUser(passphrase []byte) (err error) {
if c.userKeyRing != nil {
return
if c.user == nil {
return errors.New("user data is not loaded")
}
if c.userKeyRing, err = c.user.Keys.UnlockAll(passphrase, nil); err != nil {