Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Programatically setting Allow all Applications to access this item
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Programatically setting Allow all Applications to access this item




On Nov 17, 2004, at 5:23 PM, Ken McLeod wrote:

On Nov 17, 2004, at 2:34 PM, Ken McLeod wrote:

On Nov 17, 2004, at 11:15 AM, Paul Haddad wrote:

Sample code would be greatly appreciated I've tried a bunch of
different things to get the ACLs to change (something as simple as
adding an extra app to the list) and have been unable to get anywhere.

Here is a small sample app which demonstrates how to create keychain items with custom access control settings. The items are created using SecKeychainItemCreateFromContent, which takes a SecAccessRef as a parameter.


This sample code makes use of Foundation classes (Objective-C) as a convenience for dealing with arrays and strings, but Objective-C is not required to use the SecAccess APIs.

Thanks to feedback from Paul and Perry, I've updated the sample to handle the case where the access control settings are changed on an existing item. (The previous sample only worked if you created the access reference prior to creating the item.)


Enjoy,
-ken

Resending with a compressed attachment, as the list appears to enforce a message size limit of 12K. :-(


-ken

Attachment: accessExample.tgz
Description: GNU Zip compressed data


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Apple-cdsa mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Programatically setting Allow all Applications to access this item (From: Garth Cummings <email@hidden>)
 >Re: Programatically setting Allow all Applications to access this item (From: Ken McLeod <email@hidden>)
 >Re: Programatically setting Allow all Applications to access this item (From: Paul Haddad <email@hidden>)
 >Re: Programatically setting Allow all Applications to access this item (From: Ken McLeod <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.