Retrieves status information of a keychain.
- macOS 10.2+
A keychain object of the keychain whose status you wish to determine for the user session. Pass
NULLto obtain the status of the default keychain.
On return, a pointer to the status of the specified keychain. See
Secfor valid status constants.
This function retrieves the status of a specified keychain. You can use this function to determine if the keychain is unlocked, readable, or writable. Note that the lock status of a keychain can change at any time due to user or system activity. Because the system automatically prompts the user to unlock a keychain when necessary, you do not usually have to worry about the lock status of a keychain. If you do need to track the lock status of a keychain, use the
Sec function to register for keychain notifications.