+ /*
+ * If the user have explicity opted in to UseDataProtectionKeychain, then don't touch the legacy keychain at all
+ * ie don't move the item back to legacy keychain if you remove sync=1 or the inverse.
+ */
+ if (useDataProtectionKeychainFlag) {
+ CFDictionaryRef attrs_ios = SecItemCopyTranslatedAttributes(query,
+ CFDictionaryGetValue(query, kSecClass), true, true, false, true, true, true);
+ if (!attrs_ios) {
+ status_ios = errSecParam;
+ } else {
+ status_ios = SecItemUpdate_ios(attrs_ios, attributesToUpdate);
+ CFRelease(attrs_ios);
+ }
+ secitemlog(LOG_NOTICE, "SecItemUpdate(ios only) result: %d", status_ios);
+ return status_ios;
+ }
+