kSecAppleSharePasswordItemClass is incorrectly deprecated in the 10.9 SDK

Originator:thakis
Number:rdar://14281375 Date Originated:
Status: Resolved:
Product:os x sdk Product Version:
Classification: Reproducible:
 
26-Jun-2013 02:42 PM Nico Weber:
Summary:

kSecAppleSharePasswordItemClass is unconditionally marked as SEC_DEPRECATED_ATTRIBUTE in SecKeychainItem.h unconditionally. However, the comment next to it says:

"""Note: AppleShare passwords are no longer used by OS X, starting in Leopard (10.5). Use of this item class is deprecated in OS X 10.9 and later; kSecInternetPasswordItemClass should be used instead when storing or looking up passwords for an Apple Filing Protocol (AFP) server."""

So it should only be marked as deprecated if the deployment target is 10.9+ (i.e. use DEPRECATED_IN_MAC_OS_X_VERSION_10_9_AND_LATER instead of just DEPRECATED_ATTRIBUTE when defining SEC_DEPRECATED_ATTRIBUTE.

Also, I think DEPRECATED_ATTRIBUTE is defined in a sane way in AvailabilityMacros.h, you don't need the check for __clang__.

Steps to Reproduce:

Build an app with deployment target 10.6 using the 10.9 sdk.

Expected Results:

Builds.

Actual Results:

Deprecation warning about kSecAppleSharePasswordItemClass

Regression:

Yes.

Notes:

26-Jun-2013 02:58 PM Nico Weber:
Also, https://github.com/Apple-FOSS-Mirror/libsecurity_keychain/blob/master/lib/SecItem.cpp still uses kSecAppleSharePasswordItemClass on code that's newer than 10.5.

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!