Mailing Lists: Apple Mailing Lists

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

Re: Given a SecIdentityRef, how can I tell if using it will put up UI?



--On May 1, 2006 6:00:20 PM -0500 Paul Nelson <email@hidden> wrote:

Is there a way to find its corresponding SecKeychainRef?

Do I have to search all keychains for its SecKeychainRef?

The SecIdentityRef came from SecIdentitySearchCopyNext, so I never knew
what keychain it was in.

Use SecIdentityCopyPrivateKey or SecIdentityCopyCertificate to get the private key or certificate parts respectively, then call SecKeychainItemCopyKeychain on those to get their keychain container. (Both SecCertificateRef and SecKeyRef *are* SecKeychainItemRefs and can be cast to such.)


Note that it is perfectly possible for the two pieces to be in *different* keychains, and it's up to you to decide what you want to do in that case.

Cheers
 -- perry
---------------------------------------------------------------------------
Perry The Cynic                                             email@hidden
To a blind optimist, an optimistic realist must seem like an Accursed Cynic.
---------------------------------------------------------------------------

_______________________________________________
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
References: 
 >Given a SecIdentityRef, how can I tell if using it will put up UI? (From: Paul Nelson <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.