keybase / go-keychain

Golang keychain package for iOS and macOS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Blank labels when Keychain prompts for access to items

lox opened this issue · comments

I'm having a really strange problem with Keychain entries created via Keychain:

screenshot

Despite having a Label, my items show a blank string when queried. When I create one manually it works fine.

Created with:

	kcItem := gokeychain.NewItem()
	kcItem.SetSecClass(gokeychain.SecClassGenericPassword)
	kcItem.SetService(k.service)
	kcItem.SetAccount(item.Key)
	kcItem.SetLabel("LABEL " + item.Label)
	// kcItem.SetDescription("DESCR" + item.Description)
	kcItem.SetData(item.Data)
	kcItem.SetSynchronizable(gokeychain.SynchronizableNo)
	kcItem.SetAccessible(gokeychain.AccessibleWhenUnlocked)
	kcItem.UseKeychain(kc)
	kcItem.SetAccess(&gokeychain.Access{SelfUntrusted: !item.TrustSelf})

Closed this, as it seems to be related to my SetAccess call, which is of my own doing presumably.