Creating native binaries using GNU-Crypto

Stefan Prelle prelle@informatik.uni-bremen.de
Wed Dec 10 15:33:00 GMT 2003


Hi,
I'm trying to build a native executable that uses the GNU-Crypto JCE
implementation. I can link against the libraries that were installed by
GNU-Crypto but when I execute the program it fails to load the providers
class.
The code is roughly like this:
 Provider prov = (Provider)Class.forName("gnu.crypto.jce.GnuCrypto");
 Security.addProvider(prov);
On execution Class.forName fails although the class exists in the shared
library and the corresponding jar-file.
I figured that at compile time the gcj/linker isn't aware that the
program depends on the class. So I modified the code like this:
 Security.addProvider(new gnu.crypto.jce.GnuCrypto());
Now on execution the provider is found but when trying to instantiate a
cipher it fails loading the required class - which is the same problem
as before.
So, how can I make the classes of the security provider available for
the Class.forName() method?
Regards,
 Stefan


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /