Adding touch ID support (via new data protection keychain)
This update mainly enables Touch ID support and adds support for data protection keychain.
From this article, macOS has two keychain implementations:
- File-based keychain
- Data protection keychain
Currently this package is using the (File-based keychain). However eventually, the file-based keychain will be phased out and is unofficially deprecated by Apple.
The new keychain (data_protection_keychain.go) is mostly copied from keychain.go. There were some challenges because keychain.go currently relies on 99-designs/go-keychain which is quite an old version, and the latest version of keybase/go-keychain has removed support for file-based keychain.
Merging keybase/go-keychain back into 99designs/go-keychain doesn't make sense as keybase is more actively maintained. I've locked to my current PR of keychain/go-keychain.
The existing keychain.go can still be used but should be considered as FileBasedKeychain. I didn't rename it for compatibility reasons.
Testing hasn't been added yet because end-to-end testing the data protection keychain requires a signed macOS app, so we need to figure out how to do that on a CI/CD level.