ActivCard CAC SDK troubles - help!
843851Aug 13 2003 — edited Aug 14 2003I have been programming in Java for several years, but am new to smart cards. I have been given the task of trying to extract cryptographic-related objects from DoD Common Access Cards (CACs). The DoD PKI web site indicated that I needed the ActivCard CAC SDK. I got it, and still do not know where to start in my effort to write my own code to access certificates on our cards.
The CAC SDK came with very little documentation concerning "How To" use the jars, DLLs, and cabs that are on the CD. The java samples that came with it do not run 'as is'. When you try to use the html files to launch the sample applets, you get the following (using Java 1.4+ plugin):
Netscape security model is no longer supported.
Please migrate to the Java 2 security model instead.
I assume this is because the ActivCard samples were not written for the Java 1.3+ security model.
If I create my own signed jar file with the necessary class files (pulled from various ActivCard jar files) and one of their DLL files (that took me a while to identify), I can run the applet (it still gives the warnings, but it runs!). When I try to run the same sample as an application (I added a main() to call the applet's init(), and the applet already created it's own Frame), and I use my same signed jar file, it will not run. I get the following message:
java.lang.ClassNotFoundException: 'com.ms.security.PolicyEngine' and 'netscape.security.PrivilegeManager' not found
I assume this is because of some missing jar/dll, perhaps supplied by the browswer when run as an applet?
I wrote my own code to just 'connect' using the ActivCard API that I found on the CD (BTW: I could find no document that would map their API to the BSI API: the names were not the same). I was not successful. In my code, I loaded every DLL that came with the CAC SDK, and all the DLLs that came with the ActivCard Gold product. This time I got the following error:
JNIBSI loadLibrary Exception
com.activcard.bsi.BSIException: Native Dll access error Exception=java.lang.Null
PointerException=Native Dll access error, errorCode=-20000
I have no idea where this is coming from, other that from deep down inside of a DLL. The javadoc for the ActivCard API has no comments, only the auto-generated text. I have called ActivCard for help and they say they offer no support for the CAC SDK since they give it away.
Is there anybody out their that might be able to help me? At least point me in the right direction?