Each keychain item defines how it may be accessed. The information about access privileges is kept in a SecAccessRef structure. To get the access structure for a particular keychain item, you use the following function:
OSStatus SecKeychainItemCopyAccess (SecKeychainItemRef item, SecAccessRef *access);
To change the access on a keychain item, you edit the SecAccessRef and write it to the keychain item using:
OSStatus SecKeychainItemSetAccess (SecKeychainItemRef item, SecAccessRef access);
What, then, is a SecAccessRef? You can get a list of access control lists (ACLs) from it. Each access list has a list of trusted applications that are allowed to access the keychain item. Some applications can access the keychain item only ...