Add cloud-sync control to PasswordOptions.
#230
Merged
+54
−0
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.
Fixes #229.
This was a slightly more extensive change than I had first thought it would be. For one thing, although the set- and get-password operations had been extended publicly to allow clients to specify
PasswordOptions, the delete-password operation had not been, so I added that support.More importantly, the cloud-sync option for passwords is not binary, it's a tristate with a don't care value. Thus I had to do an enormous amount of testing to understand how the don't-care value affected all three operations. I have reflected the results of my testing in the fairly extensive documentation for
set_access_synchronized.Finally, I had to add the
kSecAttrSynchronizationAnytri-state value to the exports of security-framework-sys so that I could use it inset_access_synchronized.Sadly, the cloud-sync option can only be used from an application that has a provisioning profile with the iCloud capability. Since command-line apps can't have provisioning profiles, I used my rust-on-ios test harness to do this testing, and haven't tried to add any Rust tests to the security framework.