Deletes one or more keychains from the default keychain search list, and removes the keychain itself if it is a file.
- macOS 10.2+
A single keychain object or a reference to an array of keychains you wish to delete. To delete more than one keychain, create a
CFArrayof keychain references (type
Sec) and pass a reference to the array.
In macOS 10.3 and later, passing
NULLto this parameter returns an
errerror code. In OS X 10.2, this parameter was named
Sec Invalid Keychain
keychainand only took a single keychain object. Passing
NULLto this parameter deleted the user’s default keychain.
The keychain may be a file stored locally, a smart card, or retrieved from a network server using non-file-based database protocols. This function deletes the keychain only if it is a local file.
This function does not release the memory used by the keychain object; you must call the
CFRelease function to release each keychain object when you are finished with it.