Messages: iMessage Keychain Handling Broken

Originator:m.hanauska
Number:rdar://11889493 Date Originated:17-Jul-2012
Status:Open Resolved:
Product:MacOS Product Version:10.8
Classification:Other Bug Reproducible:Always
 
Summary:
When enabling iMessage in Messages, Messages creates many items in the default keychain, e.g. many passwords starting with "ids" in their name. However, it also creates a public/private key pair only labeled "<key>". Despite the fact that this is a broken label IMHO and thus qualifies as a bug (a key should have a DESCRIPTIVE name, <key> is probably the most stupid name a key can carry), Messages seems to never actually use this key, since removing it completely won't cause it to be recreated next time messages starts.

Messages also creates a password item labeled "com.apple.facetime: registrationV1" and two other keys, "iMessage Encryption Key" and "iMessage Signing Key". When moving those keys from the "default keychain" (which is not labeled "login" on my system) to another keychain, Messages cannot find these any longer and recreates them. I consider this a bug. Users are free to have different keychains with different passwords and settings and an app should always search *ALL* keychains for a desired item and when manipulating the item, it should always manipulate it in place, so it stays in whatever keychain it is currently found.

Steps to Reproduce:
1. On a freshly installed OS X 10.8, create a second keychain.
2. Start messages.
3. Activate iMessages.

4. Move all items created by Messages from the login keychain to the keychain created in step 1.
5. Restart Messages.

Expected Results:
Messages finds the items in the other keychain, everything is fine.

Actual Results:
Messages recreates three of those items again in the default keychain.


Regression:
n/a

Notes:
I'm very surprised that pretty much all applications out there are able to get the keychain usage right, only Apple's own apps permanently have issues as soon as a user has multiple keychains and items are not in the default keychain (other samples: Airport/WiFi passwords or XCode codesigning certs, etc.). Apple fails to follow their own recommendations to app developers regarding "keychain usage"; that's awkward.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!