Various improvment of macOS backend - #760
Open
YakBizzarro wants to merge 5 commits into
Open
Conversation
…ric_password` Remove an unused parameter from a private function in the macOS backend. Error are raised anyway just after the unused check
Add support for retriving credentials with or without providing a username. The implementation of `find_generic_password()` was already quite complete for the task. It has been improved by adding the username to the query (`kSecAttrAccount`) only if the user provided a username to look for. Moreover, the query now ask for all the attributes (kSecReturnAttributes=True) so that both username and password can be extracted from the response. Since the reply now is a `CFDictonary`, all the functions necessary to parse it have been added, including one for `CFString`. Source: https://developer.apple.com/documentation/security/searching-for-keychain-items Fix jaraco#432, jaraco#711
This reverts commit ca2982b. Since now `get_credential()` is supported on all platform, make the test more stringent.
All the CF objects that we create or copy, must be freed with `CFRelease` when done. This commit introduce this mechanism for all objects we create and own. It uses a try/finally pattern to ensure destruction of objects is always performed also when exceptions are raised. Tested with XCode `leaks` utility. Source: https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/CFMemoryMgmt.html Fix jaraco#670
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Various improvements of the macOS backend. In particular:
get_credential(), so that credentials can be retrieved without specifying a usernameMore details in the individual commit messages
Fix #432, #711, #670