keybase / go-keychain

Golang keychain package for iOS and macOS
MIT License
574 stars 118 forks source link

Add errSecUserCanceled error #91

Closed tim-monzo closed 1 year ago

tim-monzo commented 1 year ago

Often reading from Keychain triggers a prompt to confirm that I'm happy for this executable to access this Keychain item. If I dismiss this prompt by hitting escape, we get an error code of -128.

Looking at SecBase.h, it looks like this is errSecUserCanceled, which makes sense.

This PR adds support for this error code, including a human-readable message taken from SecBase.h.

joshblum commented 1 year ago

Thanks @tim-monzo !