EMKeychain update

I originally found EMKeychain a few months back and added it to my project to take over managing interactions between my app and the Keychain. It worked well until I updated to Snow Leopard and started using the LLVM GCC 4.2 compiler. Doing so threw some new errors about non-explicit casts and deprecated methods. I went in search of an update on Extendmac’s site and by chance found @sdegutis’s fork of the project on GitHub.

I forked the project here and started replacing my current EMKeychain setup with this new one. The newer isn’t terribly different but it went from 4 files to 2, and we’re not using “proxy” object anymore instead just class methods for getting / creating keychain items.

One thing I did notice is the inconsistent results, but I don’t think it’s due to this newer version. I created a temp project and ran a loop getting and printing a specific keychain password 10 times and got the actual password, null, or the password with some extra characters at random times. Not encouraging.

Luckily I did track down the issue; the raw char password wasn’t being converted to an NSString object correctly, so I was able to write a patch using the

C strncpy
method. You can check out my *fixed* version with the link above, but I did find in the network what is probably a better fix with user irons fork, which I plan on integrating soon.



My name is Clint Shryock. I develop things in Go and Ruby. I live in central Missouri, where the weather is beautiful 4 months of the year.
|                       |
|      (ノ^_^)ノ      |
|                       |
|   ☜(゚ヮ゚☜)    |
|                       |
|     ౿(ఠ_ఠఎ)    |
|                       |
|        ಠ_ಠ         |
x                      x
  xxx           xxx
       xx    xx