• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Is it possible to compare two SecKeychainRef?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is it possible to compare two SecKeychainRef?


  • Subject: Re: Is it possible to compare two SecKeychainRef?
  • From: Andrei Tchijov <email@hidden>
  • Date: Mon, 27 Mar 2006 15:50:00 -0500

Greg,
Thanks for reply. I have noticed that aKeyChain and bKeyChain numeric values will be the same if two keychains are the same, but I could not find anywhere in the documentation any reassurance that this is how it is and how it is ever going to be.
Thanks again. For now I will just use this simple Ref comparison as a test,


Andrei


On Mar 27, 2006, at 3:16 PM, Greg Herlihy wrote:

Use == to test whether two SecKeychainRef's refer to the same object:

    SecKeychainRef  aKeyChain;
    SecKeychainRef  bKeyChain;
    ...

    if (aKeyChain == bKeyChain)
    {
       // a and b are the same keychain

Otherwise you could call CFEqual. But CFEqual tests whether two objects are
equal in content - not whether they both refer to the same object (though
clearly an object would be considered equal to itself).


Greg


On 3/27/06 8:47 AM, "Andrei Tchijov" <email@hidden> wrote:

HI,
I need to make sure that keychain I am about to delete (reference to
which I am getting via full path and SecKeychainOpen) is NOT default
keychain (reference to which I am getting via
SecKeychainCopyDefault). Basically I am trying to answer the question
if two SecKeychainRef's refer to the same keychain or not.  How can I
solve this problem?

Thanks,

Andrei Tchijov

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden



_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Re: Is it possible to compare two SecKeychainRef? (From: Greg Herlihy <email@hidden>)

  • Prev by Date: Re: Pop up window ala msn messenger
  • Next by Date: Re: Pop up window ala msn messenger
  • Previous by thread: Re: Is it possible to compare two SecKeychainRef?
  • Next by thread: printer dialog
  • Index(es):
    • Date
    • Thread