Usable Keychain Update

January 7th, 2008

Some time ago I shared a free AppleScript interface I put together for accessing the Mac OS X keychain with some degree of speed and grace. The download, named “Usable Keychain Scripting” was my frustrated response to the more or less completely unusable Keychain Scripting interface in Mac OS X.

Usable Keychain Scripting was awesome, completely spanking Apple’s scripting support in speed and functionality. Frankly, I was hoping that by the time Leopard rolled around, they might have fixed the built-in scripting support, but unfortunately, they have not. So UKS still has a place in this world. As luck would have it, I don’t find myself particularly needing to script the keychain so often these days, but since I shared the resource in August, 2006, a few of you have gotten in the habit of using it. Some of you even wrote in to let me know that it was itself rather broken (and therefore unusable) as of Leopard. Thanks for the tip!

As I was addressing a confusing issue for Leopard (basically the keychain items all lost their “name” attributes), I also discovered something much more sinister. UKS was exceedingly unusable on Intel-based Macs, thanks to a classic “OSType < -> String” conversion problem, which didn’t account for byte order on Intel CPUs.

Long story short? If you’re one of the few who needs Usable Keychain Scripting, you’ll be a lot happier with the 1.0b3 release, which I’ve just posted.

Download UKS 1.0b3

If you’ve got an older version of UKS installed, be sure to get rid of it completely so it doesn’t get “addressed” when you write your script. To be sure, run the script:

version of app "Usable Keychain Scripting"

And make sure it’s 1.0b3. If it’s not, you’ll have to kill all off any running copy of UKS and throw out the old copy of the app. The safest bet is to throw away the old app and reboot your computer.

If you’re not one of the people already using it, keep it in mind the next time you get completely frustrated by how insanely unusable Apple’s keychain scripting is.

4 Responses to “Usable Keychain Update”

  1. Mark Dodwell Says:

    Hi — many thanks for this, it is so much better and more reliable than the Apple Keychain Scripting. However, I really need to be able to write to the keychain as well — are you considering adding this functionality?

    Cheers!

  2. Daniel Jalkut Says:

    Hi Mark – to be honest I have very little motivation to work on this anymore because of bigger fish to fry and because I don’t really need it so much for my own needs anymore.

    I think for writing to the keychain you should be able to use the standard Apple scripting support. There’s no reason I know of that you can’t use mine for faster access to reading stuff out, and then use Apple’s to update or add items.

    Daniel

  3. Constantin Says:

    any chance of an update for lion? doesn’t seem to be working properly.

  4. Daniel Jalkut Says:

    @Constantin: Yep, I recently blogged about it:

    http://www.red-sweater.com/blog/2035/usable-keychain-scripting-for-lion

    It’s still “beta” for sure, some little bugs here and there, but this should more or less work well on Lion for most tasks.

Comments are Closed.

Follow the Conversation

Stay up-to-date by subscribing to the Comments RSS Feed for this entry.