Making iKeyman work on MacOS

A word of warning and disclaimer before I proceed.

“I’m not sure if the following steps violate any licensing restrictions and I recommend you check with your own suppliers as to the licenses and permissions of use. I played around with this to see if it would work and used only a trial version as a Proof of Concept. I have since then deleted the installation on my PC as my PoC was complete.
Please see the following page for an official disclaimer. Proceed with caution”

The requirement was this – How to manage private and public keys and certificates for SSL, signing etc., and I could not find a better tool than IBM’s ikeyman. Although Java’s own keytool is as powerful, sometimes simple things like exporting a private key is a monstrous task in keytool. If you have better ways of doing it, I would be glad to hear about it.

Hence I downloaded the Trial version of IBM HTTP Server 7.0.0.0 from the IBM website. The version I downloaded was for Linux X86. Since I use an Apple Mac, although I could untar all the files, I could not run the install command directly. However, I used the java -jar setup.jar command to start the IBM installer on the mac. See the following screenshot.

Continue with the rest of the installation and ignore the unsupported operating system message.  Finally, click finish to complete the installation. You will also get a Partial Installation Success message. This is because although the setup program created the directories and the files correctly, it did not replace important placeholders within the scripts in the bin directory. 
I had to go into the IBM/HTTPServer/bin directory and replace all occurrences of @@SERVERROOT@@, @@ServerRoot@@ and @@GSKLIBPATH@@ with the actual installation path.
Once that is done, copy the following Jars from within the IBM/HTTPServer/java/jre/lib directory (Some may be in /lib/ext and some may be in /lib/security) and copy them to /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/lib/ext directory. 
ibmpkcs.jar

IBMKeyManagementServer.jar

gskikm.jar
ibmpkcs11impl.jar
local_policy.jar

US_export_policy.jar

ibmcmsprovider.jar
ibmsaslprovider.jar
localedata.jar

apple_provider.jar

ibmjcefips.jar
ibmspnego.jar
sunjce_provider.jar

dnsns.jar

ibmjcefw.jar
ibmxmlencprovider.jar
sunpkcs11.jar

dtfj-interface.jar

ibmjceprovider.jar
iwsorbutil.jar 
xmlencfw.jar

dtfj.jar

ibmkeycert.jar
jaccess.jar

If any of the files are found in the directory already, ignore them. Now go to IBM/HTTPServer/gsk7/bin directory and run gsk7ikm and voila you will get the good old ikeyman.