Hi Mike,
In my code, nowhere am using Message Digest algorithm explicitly. Looks
like JDK's classes are internally using the algorithm. See the stack
trace:
java.lang.SecurityException: SHA MessageDigest not available
at sun.rmi.server.Util.computeMethodHash(Util.java:378)
at
sun.rmi.server.UnicastServerRef$HashToMethod_Maps.createMap(UnicastServerRef.java:544)
at
sun.rmi.server.WeakClassHashMap.getMap(WeakClassHashMap.java:71)
at
sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:196)
at
java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:306)
at
java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:248)
at
java.rmi.server.UnicastRemoteObject.<init>(UnicastRemoteObject.java:146)
at
java.rmi.server.UnicastRemoteObject.<init>(UnicastRemoteObject.java:132)
at core.Engine.<init>(Unknown Source)
the class Engine, in my code, imports java's RMI package, & the RMI
package seems to internally call/use SHA message digest algorithm.
Regards,
Raga
> > Hi,
> >
[quoted text clipped - 10 lines]
>
> --Mike Amling
Mike Amling - 01 Aug 2006 16:03 GMT
> Hi Mike,
>
[quoted text clipped - 22 lines]
> the class Engine, in my code, imports java's RMI package, & the RMI
> package seems to internally call/use SHA message digest algorithm.
So, when using the IBM JVM, if you invoke
MessageDigest.getInstance("SHA1") and MessageDigest.getInstance("SHA")
in your own code does the former work and the latter throw a
SecurityException?
If so, then I think the real problem is that
sun.rmi.server.Util.computeMethodHash should be asking for SHA1 if
that's what it wants and not SHA which is not what it wants. However the
only workaround I can think of is to supply a Provider.
--Mike Amling
Raga - 02 Aug 2006 13:53 GMT
Thanks Mike! I used Bouncy Castle's JCE/provider solution & it worked!
> > Hi Mike,
> >
[quoted text clipped - 33 lines]
>
> --Mike Amling