Opens a keychain.
SDK
- macOS 10.2+
Framework
- Security
Declaration
func SecKeychainOpen(_ pathName: Unsafe Pointer<Int8>, _ keychain: Unsafe Mutable Pointer<Sec Keychain?>) -> OSStatus
Parameters
pathName
A constant character string representing the POSIX path to the keychain to open.
keychain
On return, a pointer to the keychain object. You must call the
CFRelease
function to release this object when you are finished using it.
Return Value
A result code. See Security Framework Result Codes.
Discussion
Use this function to retrieve a pointer to a keychain object given the path of the keychain. You don't need to close the keychain, but do release the memory that the pointer occupies when you are finished with it.