Change to SecKeychainFindGenericPassword conflicts with current and past documentation

Originator:jalkut
Number:rdar://21955687 Date Originated:23-Jul-2015 00:54 AM
Status:Open Resolved:
Product:Developer Tools Product Version:
Classification: Reproducible:
 
Summary:
In Xcode 7 beta 4's SDK, nullability markers were added to SecKeychainFindGenericPassword, indicating that the passwordLength parameter is *not* nullable. In current documentation and in previous OS releases, the argument was specifically documented as being required to be NULL when passwordData (which is now marked nullable) is NULL:

"Pass NULL if you want to obtain the item object but not the password data. In this case, you must also pass NULL in the passwordLength parameter."

In the beta 4 SDK's header file for SecKeychain.h, the caveat about setting passwordLength to NULL has been removed.

Is it Apple's intention that clients of this function should be required to pass a non-null passwordLength even though they are not asking for passwordData? If so, can Apple confirm that passing a non-null argument in these circumstances is safe when the resulting code runs on 10.10.5 and earlier OS releases?

Steps to Reproduce:


Expected Results:


Actual Results:


Version:
Version 7.0 beta 4 (7A165t)

Notes:


Configuration:


Attachments:

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!