SecKeychainSearchCreateFromAttributes deprecated, no replacement API for searching other keychains
| Originator: | patrick | ||
| Number: | rdar://19080507 | Date Originated: | 25-Nov-2014 11:10 AM |
| Status: | Open | Resolved: | |
| Product: | OS X SDK | Product Version: | OS X 10.10 |
| Classification: | Other Bug | Reproducible: | NA |
Summary: In Mac OS X 10.7, Security.framework's SecKeychainSearchCreateFromAttributes API was deprecated: ``` This function is deprecated in Mac OS X 10.7 and later; to find keychain items which match specified attributes, please use the SecItemCopyMatching API (see SecItem.h). ``` Unfortunately, SecItemCopyMatching doesn't allow you to search other keychains. There's a `kSecUseKeychain` key which theoretically could work for this, but it seems to only support adding items to other keychains: ``` @constant kSecUseKeychain Specifies a dictionary key whose value is a keychain reference. You use this key to specify a value of type SecKeychainRef to which SecItemAdd will add the provided item(s).` ``` I'd also like to point out that Security-57031.1.35 continues to use this deprecated API, even in 10.10 Yosemite: http://opensource.apple.com/source/Security/Security-57031.1.35/SecurityTool/keychain_find.c
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!