Function

SecKeychainItemSetAccess

Sets the access of a given keychain item.

Declaration

OSStatus SecKeychainItemSetAccess(SecKeychainItemRef itemRef, SecAccessRef access);

Parameters

itemRef

A keychain item.

access

An access instance to replace the keychain item’s current access instance. Use the SecAccessCreate function to create a default access instance.

Return Value

Discussion

Use this function to attach an access instance to a particular keychain item. Alternatively, you can use the kSecAttrAccess attribute when calling either of the SecItemAdd or SecItemUpdate methods.

See Also

Keychain Item Access

SecKeychainItemCopyAccess

Retrieves the access of a given keychain item.