This repository was archived by the owner on Aug 24, 2019. It is now read-only.
Added support for iOS 8/OS X 10.0 AccessControl (Touch ID)#76
Open
liamnichols wants to merge 6 commits intosoffes:masterfrom
liamnichols:touchid
Open
Added support for iOS 8/OS X 10.0 AccessControl (Touch ID)#76liamnichols wants to merge 6 commits intosoffes:masterfrom liamnichols:touchid
liamnichols wants to merge 6 commits intosoffes:masterfrom
liamnichols:touchid
Conversation
`SSKeychainCreateFlags` should use `NS_OPTIONS` not `NS_ENUM` so it can be correctly converted in Swift.
Correct enum for keychain create flags
Author
|
Any news on getting this merged into the main repo? We've used it in a couple of projects here now and things seem to be working pretty well. Thanks |
Owner
|
@calebd can you review? |
|
👍 Nice! |
|
How to use accessControl with touch id? I could not find anything about it. I would like to know if is there a way to handle the errors if touch id not matching. For example, if user tap on cancel button (in touch ID dialog). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please don't automatically merge this!
I've made some modifications to the
SSKeychainQueryclass by adding some additional properties and methods that essentially allow you to use Touch ID with SSKeychain.The main change is that i've modified the
save:method to support thekSecAttrAccessControlandkSecUseNoAuthenticationUIattributes allowing you to specify aSSKeychainAccessControlobject via the newaccessControlproperty (was wrapping this in anNSObjectthe best approach?).I have also made changes to
fetch:andfetchAll:allowing you to pass in thekSecUseOperationPrompt(displayed when Touch ID is presented) viauseOperationPrompt.Finally, I've added a
update:method as there was no existing wrapper aroundSecItemUpdate().With all the above changes, You can now do something like the following to protect items with Touch ID:
Then, you can fetch them like so:
I've not really done much when it comes to maintaining backwards compatibility but I've tested my branch when compiled against the iOS 7 SDK and it still compiles but I would like it if somebody else could check over everything beforehand.
Apple Sample Code: https://developer.apple.com/library/prerelease/ios/samplecode/KeychainTouchID/Introduction/Intro.html
Let me know what you think.
Liam