I'm having trouble building this under MacOS 10.9. I'm slowly working through the issues.
First, the bizarre combination of MIT and Heimdal kerberos on the system along with non-file-based credentials caches seems to result in a few issues building, which I was able to mostly work around.
Second, for some reason I'm unable to completely store the cert in the cc. I see the API calls to put it in, but only the key makes it to the store, the cert does not. However, I noticed the "store_in_keychain.m" file and managed to get that working (with some edits). But the result is a cert that keychain access refuses to acknowledge is valid because the key length is too short.
So, I modified the requested key length... and found that it wasn't controlled by a #define in any #include file, so I had to edit multiple #defines in a few .c files and one .m file. But now I appear to have a working kx509 cert along with the key in my kx509.keychain file.
I'm currently working on getting "kxlist" to read from that kechain file instead of the kerberos cc.
Want a patch file or anything?