August 2011
Intermediate to advanced
552 pages
23h 48m
English
To create a new keychain item, you use this function:
OSStatus SecKeychainItemCreateFromContent (SecItemClass itemClass,
SecKeychainAttributeList *attrList,
UInt32 passwdLength,
const void *password,
SecKeychainRef keychainRef,
SecAccessRef initialAccess,
SecKeychainItemRef *itemRef);where the itemClass is kSecInternetPasswordItemClass, kSecGenericPasswordItemClass, kSecAppleSharePasswordItemClass, or kSecCertificateItemClass. If you supply NULL as the keychainRef, the item will be added to the default keychain. itemRef will be set to point to the newly created item. To use the default access, just supply NULL as the initialAccess.
As an example, here is a short program that will insert a new item into your default ...
Read now
Unlock full access