|
From: Moshe S. <mo...@sp...> - 2003-05-28 21:44:26
|
----- Original Message -----
From: "Geoff Whittington" <geo...@ya...>
To: <cry...@li...>
Sent: Tuesday, May 27, 2003 5:18 AM
Subject: Re: [Cryptix-users] NoSuchAlgorithmException from Tomcat?
> What if you put OpenPGP as the #1 provider?
This problem just gets weirder...
I changed my code to walk through the list of available providers and
delete them all. Then I reinserted the Cryptix providers:
java.security.Security.insertProviderAt(
new cryptix.openpgp.provider.CryptixOpenPGP(),1 );
java.security.Security.insertProviderAt(
new cryptix.jce.provider.CryptixCrypto(),2 );
I then print out what's available to make sure those are the only ones,
and they are.
Then as before I create a KeyStore and try to load my file. Here's my
code:
java.io.FileInputStream fis = new
java.io.FileInputStream("/home/mjs/myKeyStore.pkr");
java.security.KeyStore ks =
cryptix.pki.ExtendedKeyStore.getInstance("OpenPGP/KeyRing");
cryptix.pki.ExtendedKeyStore eks = (cryptix.pki.ExtendedKeyStore) ks;
out.println("Everything works fine till here...");
eks.load(fis, null);
out.println("we never get here.");
The exception I get is now complaining about a different algorithm:
java.lang.RuntimeException: DSA algorithm not found
at cryptix.openpgp.algorithm.PGPDSA.initSigObject(PGPDSA.java:130)
at cryptix.openpgp.algorithm.PGPDSA.(PGPDSA.java:82)
at sun.reflect.GeneratedConstructorAccessor198.newInstance(Unknown
Source)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCons
tructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:296)
at java.lang.Class.newInstance(Class.java:249)
at
cryptix.openpgp.algorithm.PGPAlgorithmFactory.getPublicKeyAlgorithm(PGPA
lgorithmFactory.java:445)
at
cryptix.openpgp.packet.PGPKeyPacket.decodePublicData(PGPKeyPacket.java:2
28)
at
cryptix.openpgp.packet.PGPPublicKeyPacket.decodeBody(PGPPublicKeyPacket.
java:91)
at
cryptix.openpgp.packet.PGPPacketFactory.readPacket(PGPPacketFactory.java
:253)
at
cryptix.openpgp.provider.PGPKeyBundleFactory.helper(PGPKeyBundleFactory.
java:84)
at
cryptix.openpgp.provider.PGPKeyRingKeyStore.engineLoad(PGPKeyRingKeyStor
e.java:366)
at java.security.KeyStore.load(KeyStore.java:652)
at org.apache.jsp.initialize_jsp._jspService(initialize_jsp.java:140)
Any ideas? Again, this is just happening in Tomcat!
|