Cipher.getInstance() gets stuck when called by instrumented method
OK, this is my situation:
I wrote a simple JVM agent that instruments some methods to trace the behavior of virtually any java application.
Basically I created a Logger object in a static initialization method. This initialization is invoked from within the agent using JNI. The object is then used by the instrumented methods to log some information.
The instrumentation worked just fine and I got my execution log.
Then I had to add some encryption/signature mechanisms to prevent the execution log from being read or modified. I modified my Logger (now named SecureLogger) so that it took any log entry and encrypted it before writing to the logfile.
SecureLogger behaves correctly when used in an external testing application.
My problem is:
When I create the SecureLogger object I get stuck at the first Cipher.getInstance() call (same problem when the method is called on Mac or MessageDigest objects).
I thought it was a Provider problem, so I tried to get the Providers list with Security.getProviders() and they are all correctly retreived.
BTW, the jar containing the class used to instrument the methods and all other classes needed by it (included SecureLogger) is loaded with option -Xbootclasspath/a (because otherwise the agent would not see them).
Any idea of why the calls to getInstance never return?
Thanks for your help :)
Vale

