SecKeychainItem Unique Identifier, how to replace SecKeychainItemGetUniqueRecordID

Is there a replacement for "SecKeychainItemGetUniqueRecordID"?

I'm getting certificates from two different places and I would like a safe way to confirm if these two item are referencing the exact same object in the entire keychain.

p.s. Why is "Keychain" or "SecKeychainItem" not a tag?

Replies

Is there a replacement for SecKeychainItemGetUniqueRecordID?

Probably not. That concept only makes sense is the legacy file-based keychain. This issue simply does not crop up in the (iOS-style) data protection keychain (due to the keychain item uniqueness criteria discussed here).

p.s. Why is Keychain or SecKeychainItem not a tag?

Because we created tags for each framework and we expect folks to use the tag for the framework containing the API that they’re working with. In most cases that scheme works well. Trying to come up with a comprehensive list of all subsystems within all framework would be quite a challenge.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thank you Quinn for your help.

On a hunch I tried CFEqual to compare the two certs and it appears to do what I want... Sorry that I took up your time, if only I tied this earlier.