Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

A bug in SecKeychainSetSearchList?



Hello everyone!

I think I found another bug in the Keychain API:

   SecKeychainCopySearchList(&searchList);
   newSearchList = CFArrayCreateMutableCopy(NULL, 0, searchList);
   CFArrayAppendValue(newSearchList, keychainToAdd);
   SecKeychainSetSearchList(newSearchList);

The keychain to add is named blah. Before executing these lines of codes, my keychain search list in Keychain Access looks like this:

login
System
X509Anchors

After adding the one keychain, the list looks like this:

login
System
blah
System
X509Anchors

Interesting. Now where does the second system comes from? Even better, hitting CMD+ALT+L in Keychain Access shows only one System, not two, so I can't remove it. It will go away however if I remove the shared flag of System (not even leaving the dialog) and then restoring it again. If I now close the dialog, the keychain list displays correctly:

login
blah
System
X509Anchors

Okay, so what have I done wrong? Where does the second keychain come from? How can I prevent it from appearing in the list? I know, I could use the domain-based search list functions that exist since 10.3, but maybe I don't want to, or do I have to? If so and my app should still work in 10.2 (not that this is really important) how do I go about, a code switch depending on OS version?

--
Best Regards,
    Markus Hanauska


_______________________________________________ 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


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.