Unwanted keychain access dialog
Unwanted keychain access dialog
- Subject: Unwanted keychain access dialog
- From: Mitchell Laurren-Ring <email@hidden>
- Date: Wed, 25 Mar 2015 14:05:50 -0700
Hello:
I have an application that runs as a launch agent. This application acts as a websocket server for browser based clients. Because we want to support SSL, this application uses keychain APIs to store certificate/key information. Because we would rather not leave this information on the user’s system (a requirement for which I have no control), we use a temporary keychain. For example, our code to create the keychain looks like this:
result = SecKeychainOpen(sKeychainPath, &mKeychain);
if (result == 0)
{
result = SecKeychainDelete(mKeychain);
CFRelease(mKeychain);
}
result = SecKeychainCreate(sKeychainPath, strlen(pw), pw, FALSE, NULL, &mKeychain);
And then we call SecKeychainItemImport for the certificate and key for later retrieval and use with the SSL layer.
This works pretty well most times but our QA has observed an intermittent behaviour where a modal dialog will be displayed asking for the keychain password. The text of the dialog is approximately: myapp wants use the “skeychainpath” keychain. Please enter the keychain password.
We’ve seen this occur with OS X versions 10.6, 10.7, 10.9 and 10.10. I’ve tried bracketing the code with calls to SecKeychainGetUserInteractionAllowed but it hasn’t made a difference.
Is this a known problem? Is there a way to work around it?
/Mick
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden