This is a really annoying problem.
After I successfully create a keychain, Sometimes it doesn't show
in the
keychain list of the Keychain Access.
Even though I cannot see it, I know it there and delete it in the
program. Then I create it again (with the same path).
At this time in the Keychain Access there are two same keychain names
showned up. If I go futher to add or delete an item
in the keychain, it wouldn't work correctly, but the API return noErr
code.
Is there any way to avoid this problem? I like after I delete a
keychain, it should be absoutely gone from the system. It
should not become a zombie that later when I create another keychain
with the same path, it comes back.
Here is my experiment to produce this problem:
int i=0;
SeckeychainRef my_keychain = nil;
char *kc_path = "/my/kc/location.keychain";
while (i++<10) {
// delete the keychain if there is
SecKeychainOpen(kc_path, &my_keychain);
if (my_keychain) {
SecKeychainDelete(my_keychain);
my_keychain = nil;
}
// create my keychain
SecKeychainCreate(kc_path,
my_password_length,
my_password,
false,
NULL,
&my_keychain);
// remove it if it was created
if (my_keychain) {
SecKeychainDelete(my_keychain);
my_keychain = nil;
}
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Apple-cdsa mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/apple-cdsa/email@hidden
This email sent to email@hidden