Home » Language IDEs » Java Development Tools (JDT) » Algorithm PBEWithMD5AndDES not available.
Algorithm PBEWithMD5AndDES not available. [message #104897] |
Wed, 15 October 2003 04:28 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: sordell.financialengines.com
I give up.
None of the articles in the newgroups seem to help. And none of the articles
on the web seem to help either.
Here is my environemnt:
jdk1.4.1_02
Eclipse 2.1.0
JRun 3.1
W2K SP4
US_export_policy.jar (strong encryption)
local_policy.jar (strong encryption)
java.security (security.provider.4=com.sun.crypto.provider.SunJCE)
java.policy (unmodified)
The following program works fine from the command line:
import java.security.spec.KeySpec;
import javax.crypto.spec.PBEKeySpec;
import javax.crypto.SecretKey;
import javax.crypto.SecretKeyFactory;
public class FeCreateSessionKey
{
private static final String PBE_ALG = "PBEWithMD5AndDES";
public static void main(String[] args)
{
try
{
KeySpec ks = new PBEKeySpec("fepassword".toCharArray());
SecretKeyFactory skf = SecretKeyFactory.getInstance(PBE_ALG); <=
This is the line that fails where PBE_ALG is set to PBEWithMD5AndDES (PBE
alone also did not work) ...
SecretKey sk = skf.generateSecret(ks);
}
catch(Exception e)
{
e.printStackTrace();
}
}
}
The same three lines in our application which is configured to run as a JRun
server inside of Eclipse throws an exception each and every time:
Algorithm PBEWithMD5AndDES not available.
Dumping the system properties during runtime shows:
java.class.path=d:\workspace\esprit\classes;d:\workspace\esp rit\lib\BO3rdPar
ty.zip;d:\workspace\esprit\lib\BLC.zip;d:\workspace\esprit\l ib\Jama-1.0.1.ja
r;d:\workspace\esprit\lib\jdom.jar;d:\workspace\esprit\lib\j Driver.jar;d:\wo
rkspace\esprit\lib\opljni.jar;d:\workspace\esprit\lib\Phaos_ JCE_Provider.jar
;d:\workspace\esprit\lib\WS.zip;d:\workspace\esprit\lib\xerc es.jar;d:\worksp
ace\esprit\lib\servlet.jar;D:\Program
Files\Allaire\JRun\lib\xt.jar;D:\Program
Files\Allaire\JRun\lib\default_objects.jar;D:\Program
Files\Allaire\JRun\lib\ejipt.jar;D:\Program
Files\Allaire\JRun\lib\ejipt_client.jar;D:\Program
Files\Allaire\JRun\lib\ejipt_ejbeans.jar;D:\Program
Files\Allaire\JRun\lib\ejipt_jms_client.jar;D:\Program
Files\Allaire\JRun\lib\ejipt_tools.jar;D:\Program
Files\Allaire\JRun\lib\install.jar;D:\Program
Files\Allaire\JRun\lib\jrun.jar;D:\Program
Files\Allaire\JRun\lib\jrun_ejbeans.jar;D:\Program
Files\Allaire\JRun\lib\jrun_exports.jar;D:\Program
Files\Allaire\JRun\lib\jrun_objects.jar;D:\Program
Files\Allaire\JRun\lib\jsp.jar;D:\Program
Files\Allaire\JRun\lib\rhino.jar;D:\Program
Files\Allaire\JRun\lib\ssi.jar;D:\Program
Files\Allaire\JRun\lib\wddx.jar;D:\Program
Files\Allaire\JRun\lib\default_exports.jar;D:\Program
Files\Allaire\JRun\lib\ext\US_export_policy.jar;D:\Program
Files\Allaire\JRun\lib\ext\ejb.jar;D:\Program
Files\Allaire\JRun\lib\ext\iioprt.jar;D:\Program
Files\Allaire\JRun\lib\ext\jaxp.jar;D:\Program
Files\Allaire\JRun\lib\ext\jce1_2_1.jar;D:\Program
Files\Allaire\JRun\lib\ext\jcert.jar;D:\Program
Files\Allaire\JRun\lib\ext\jdbc.jar;D:\Program
Files\Allaire\JRun\lib\ext\jms.jar;D:\Program
Files\Allaire\JRun\lib\ext\jndi.jar;D:\Program
Files\Allaire\JRun\lib\ext\jnet.jar;D:\Program
Files\Allaire\JRun\lib\ext\jsse.jar;D:\Program
Files\Allaire\JRun\lib\ext\jta.jar;D:\Program
Files\Allaire\JRun\lib\ext\local_policy.jar;D:\Program
Files\Allaire\JRun\lib\ext\mail.jar;D:\Program
Files\Allaire\JRun\lib\ext\parser.jar;D:\Program
Files\Allaire\JRun\lib\ext\pop3.jar;D:\Program
Files\Allaire\JRun\lib\ext\servlet.jar;D:\Program
Files\Allaire\JRun\lib\ext\sunjce_provider.jar;D:\Program
Files\Allaire\JRun\lib\ext\activation.jar;D:\Program
Files\Allaire\JRun\servers\esprit-content-server\esprit-cont ent-app\web-inf\
jsp\bin
sun.boot.class.path=D:\downloads\jvm\1.4.1_02\jre\lib\rt.jar ;D:\downloads\jv
m\1.4.1_02\jre\lib\sunrsasign.jar;D:\downloads\jvm\1.4.1_02\ jre\lib\jsse.jar
;D:\downloads\jvm\1.4.1_02\jre\lib\jce.jar;D:\downloads\jvm\ 1.4.1_02\jre\lib
\charsets.jar;D:\downloads\jvm\1.4.1_02\jre\lib\ext\dnsns.ja r;D:\downloads\j
vm\1.4.1_02\jre\lib\ext\ldapsec.jar;D:\downloads\jvm\1.4.1_0 2\jre\lib\ext\lo
caledata.jar;D:\downloads\jvm\1.4.1_02\jre\lib\ext\sunjce_pr ovider.jar
java.ext.dirs=D:\Downloads\JVM\1.4.1_02\jre\lib\ext
java.security.policy=D:\Program Files\Allaire\JRun\lib\jrun.policy
I only mention the java.security.policy because from the command line the
program above did not have it set (and
setting -Djava.security.policy=<nothing> from Eclipse did not help).
My java.ext.dirs directory contains:
dnsns.jar
ldapsec.jar
localedata.jar
sunjce_provider.jar (which seems to be the important one)
A search for installed JREs from Eclipse | Windows | Preferences | Java |
Installed JREs | Search finds nothing on C or D even though I have the JRE
installed under D:\Downloads\JVM\1.4.1_02.
I'm running my program in Eclipse in debug mode.
I have since renamed US_export_policy.jar, local_policy.jar, jce1_2_1.jar,
jsse.jar, and sunjce_provider.jar found in the JRun lib\ext directory since
these files can be found in D:\Downloads\JVM\1.4.1_02\lib and ext, which
also did not work.
There are no other version of US_export_policy.jar and/or local_policy.jar
on my machine except for the versions found under
D:\Downloads\JVM\1.4.1_02\jre\lib\security which are the strong envryption
version (after the versions were renamed above).
As a test within Eclipse I added the following right before the problem
lines:
java.security.Provider[] providers = java.security.Security.getProviders();
for (int i = 0; i < providers.length; i++)
{
System.out.println(providers[i].getInfo());
String name = providers[i].getName();
if ("SunJCE".equals(name))
{
try
{
javax.crypto.SecretKeyFactory skf =
javax.crypto.SecretKeyFactory.getInstance(PBE_ALG, providers[i]);
}
catch(Exception e)
{
e.printStackTrace();
}
}
}
Which threw a SecurityException:
java.lang.SecurityException: The provider SunJCE may not be signed by a
trusted party
which I don't think is relevant but what is is the fact that the SunJCE
provider is found and the Provider.getInfo for it returns:
SunJCE Provider (implements DES, Triple DES, Blowfish, PBE, Diffie-Hellman,
HMAC-MD5, HMAC-SHA1)
Also returned were:
Sun (Kerberos v5)
Phaos Security Provider 1.0
SUN (DSA key/parameter generation; DSA signing; SHA-1, MD5 digests;
SecureRandom; X.509 certificates; JKS keystore; PKIX CertPathValidator; PKIX
CertPathBuilder; LDAP, Collection CertStores)
Sun JSSE provider(implements RSA Signatures, PKCS12, SunX509 key/trust
factories, SSLv3, TLSv1)
SUN's provider for RSA signatures
|
|
|
Re: Algorithm PBEWithMD5AndDES not available. [message #105463 is a reply to message #104897] |
Wed, 15 October 2003 16:03 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Darin Wright![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=darin.eclipse%40gmail.com) Messages: 454 Registered: July 2009 |
Senior Member |
|
|
This is a bug - I simple did a search for "SunJCE".
https://bugs.eclipse.org/bugs/show_bug.cgi?id=38370
Darin
"Shance Ordell" <sordell@financialengines.com> wrote in message
news:bmii3j$5lk$1@eclipse.org...
> I give up.
>
> None of the articles in the newgroups seem to help. And none of the
articles
> on the web seem to help either.
>
> Here is my environemnt:
>
> jdk1.4.1_02
> Eclipse 2.1.0
> JRun 3.1
> W2K SP4
> US_export_policy.jar (strong encryption)
> local_policy.jar (strong encryption)
> java.security (security.provider.4=com.sun.crypto.provider.SunJCE)
> java.policy (unmodified)
>
> The following program works fine from the command line:
>
> import java.security.spec.KeySpec;
>
> import javax.crypto.spec.PBEKeySpec;
>
> import javax.crypto.SecretKey;
> import javax.crypto.SecretKeyFactory;
>
> public class FeCreateSessionKey
> {
> private static final String PBE_ALG = "PBEWithMD5AndDES";
>
> public static void main(String[] args)
> {
> try
> {
> KeySpec ks = new PBEKeySpec("fepassword".toCharArray());
> SecretKeyFactory skf = SecretKeyFactory.getInstance(PBE_ALG);
<=
> This is the line that fails where PBE_ALG is set to PBEWithMD5AndDES (PBE
> alone also did not work) ...
> SecretKey sk = skf.generateSecret(ks);
> }
> catch(Exception e)
> {
> e.printStackTrace();
> }
> }
> }
>
> The same three lines in our application which is configured to run as a
JRun
> server inside of Eclipse throws an exception each and every time:
>
> Algorithm PBEWithMD5AndDES not available.
>
> Dumping the system properties during runtime shows:
>
>
java.class.path=d:\workspace\esprit\classes;d:\workspace\esp rit\lib\BO3rdPar
>
ty.zip;d:\workspace\esprit\lib\BLC.zip;d:\workspace\esprit\l ib\Jama-1.0.1.ja
>
r;d:\workspace\esprit\lib\jdom.jar;d:\workspace\esprit\lib\j Driver.jar;d:\wo
>
rkspace\esprit\lib\opljni.jar;d:\workspace\esprit\lib\Phaos_ JCE_Provider.jar
>
;d:\workspace\esprit\lib\WS.zip;d:\workspace\esprit\lib\xerc es.jar;d:\worksp
> ace\esprit\lib\servlet.jar;D:\Program
> Files\Allaire\JRun\lib\xt.jar;D:\Program
> Files\Allaire\JRun\lib\default_objects.jar;D:\Program
> Files\Allaire\JRun\lib\ejipt.jar;D:\Program
> Files\Allaire\JRun\lib\ejipt_client.jar;D:\Program
> Files\Allaire\JRun\lib\ejipt_ejbeans.jar;D:\Program
> Files\Allaire\JRun\lib\ejipt_jms_client.jar;D:\Program
> Files\Allaire\JRun\lib\ejipt_tools.jar;D:\Program
> Files\Allaire\JRun\lib\install.jar;D:\Program
> Files\Allaire\JRun\lib\jrun.jar;D:\Program
> Files\Allaire\JRun\lib\jrun_ejbeans.jar;D:\Program
> Files\Allaire\JRun\lib\jrun_exports.jar;D:\Program
> Files\Allaire\JRun\lib\jrun_objects.jar;D:\Program
> Files\Allaire\JRun\lib\jsp.jar;D:\Program
> Files\Allaire\JRun\lib\rhino.jar;D:\Program
> Files\Allaire\JRun\lib\ssi.jar;D:\Program
> Files\Allaire\JRun\lib\wddx.jar;D:\Program
> Files\Allaire\JRun\lib\default_exports.jar;D:\Program
> Files\Allaire\JRun\lib\ext\US_export_policy.jar;D:\Program
> Files\Allaire\JRun\lib\ext\ejb.jar;D:\Program
> Files\Allaire\JRun\lib\ext\iioprt.jar;D:\Program
> Files\Allaire\JRun\lib\ext\jaxp.jar;D:\Program
> Files\Allaire\JRun\lib\ext\jce1_2_1.jar;D:\Program
> Files\Allaire\JRun\lib\ext\jcert.jar;D:\Program
> Files\Allaire\JRun\lib\ext\jdbc.jar;D:\Program
> Files\Allaire\JRun\lib\ext\jms.jar;D:\Program
> Files\Allaire\JRun\lib\ext\jndi.jar;D:\Program
> Files\Allaire\JRun\lib\ext\jnet.jar;D:\Program
> Files\Allaire\JRun\lib\ext\jsse.jar;D:\Program
> Files\Allaire\JRun\lib\ext\jta.jar;D:\Program
> Files\Allaire\JRun\lib\ext\local_policy.jar;D:\Program
> Files\Allaire\JRun\lib\ext\mail.jar;D:\Program
> Files\Allaire\JRun\lib\ext\parser.jar;D:\Program
> Files\Allaire\JRun\lib\ext\pop3.jar;D:\Program
> Files\Allaire\JRun\lib\ext\servlet.jar;D:\Program
> Files\Allaire\JRun\lib\ext\sunjce_provider.jar;D:\Program
> Files\Allaire\JRun\lib\ext\activation.jar;D:\Program
>
Files\Allaire\JRun\servers\esprit-content-server\esprit-cont ent-app\web-inf\
> jsp\bin
>
>
sun.boot.class.path=D:\downloads\jvm\1.4.1_02\jre\lib\rt.jar ;D:\downloads\jv
>
m\1.4.1_02\jre\lib\sunrsasign.jar;D:\downloads\jvm\1.4.1_02\ jre\lib\jsse.jar
>
;D:\downloads\jvm\1.4.1_02\jre\lib\jce.jar;D:\downloads\jvm\ 1.4.1_02\jre\lib
>
\charsets.jar;D:\downloads\jvm\1.4.1_02\jre\lib\ext\dnsns.ja r;D:\downloads\j
>
vm\1.4.1_02\jre\lib\ext\ldapsec.jar;D:\downloads\jvm\1.4.1_0 2\jre\lib\ext\lo
> caledata.jar;D:\downloads\jvm\1.4.1_02\jre\lib\ext\sunjce_pr ovider.jar
>
> java.ext.dirs=D:\Downloads\JVM\1.4.1_02\jre\lib\ext
>
> java.security.policy=D:\Program Files\Allaire\JRun\lib\jrun.policy
>
> I only mention the java.security.policy because from the command line the
> program above did not have it set (and
> setting -Djava.security.policy=<nothing> from Eclipse did not help).
>
> My java.ext.dirs directory contains:
>
> dnsns.jar
> ldapsec.jar
> localedata.jar
> sunjce_provider.jar (which seems to be the important one)
>
> A search for installed JREs from Eclipse | Windows | Preferences | Java |
> Installed JREs | Search finds nothing on C or D even though I have the JRE
> installed under D:\Downloads\JVM\1.4.1_02.
>
> I'm running my program in Eclipse in debug mode.
>
> I have since renamed US_export_policy.jar, local_policy.jar, jce1_2_1.jar,
> jsse.jar, and sunjce_provider.jar found in the JRun lib\ext directory
since
> these files can be found in D:\Downloads\JVM\1.4.1_02\lib and ext, which
> also did not work.
>
> There are no other version of US_export_policy.jar and/or local_policy.jar
> on my machine except for the versions found under
> D:\Downloads\JVM\1.4.1_02\jre\lib\security which are the strong envryption
> version (after the versions were renamed above).
>
> As a test within Eclipse I added the following right before the problem
> lines:
>
> java.security.Provider[] providers =
java.security.Security.getProviders();
>
> for (int i = 0; i < providers.length; i++)
> {
> System.out.println(providers[i].getInfo());
>
> String name = providers[i].getName();
>
> if ("SunJCE".equals(name))
> {
> try
> {
> javax.crypto.SecretKeyFactory skf =
> javax.crypto.SecretKeyFactory.getInstance(PBE_ALG, providers[i]);
> }
> catch(Exception e)
> {
> e.printStackTrace();
> }
> }
> }
>
> Which threw a SecurityException:
>
> java.lang.SecurityException: The provider SunJCE may not be signed by a
> trusted party
>
>
> which I don't think is relevant but what is is the fact that the SunJCE
> provider is found and the Provider.getInfo for it returns:
>
> SunJCE Provider (implements DES, Triple DES, Blowfish, PBE,
Diffie-Hellman,
> HMAC-MD5, HMAC-SHA1)
>
> Also returned were:
>
> Sun (Kerberos v5)
> Phaos Security Provider 1.0
> SUN (DSA key/parameter generation; DSA signing; SHA-1, MD5 digests;
> SecureRandom; X.509 certificates; JKS keystore; PKIX CertPathValidator;
PKIX
> CertPathBuilder; LDAP, Collection CertStores)
> Sun JSSE provider(implements RSA Signatures, PKCS12, SunX509 key/trust
> factories, SSLv3, TLSv1)
> SUN's provider for RSA signatures
>
>
>
>
>
>
|
|
|
Re: Algorithm PBEWithMD5AndDES not available. [message #105477 is a reply to message #104897] |
Wed, 15 October 2003 16:07 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Chris Longfield![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=clongfield%40internap.com) Messages: 111 Registered: July 2009 |
Senior Member |
|
|
I agree.
I am seeing the same thing with the Diffie-Hellman key exchange as I
posted a couple of days ago "Algorithm DH not available".
Eclipse gurus : is this our config, or do we need to post a bug?
Chris
Shance Ordell wrote:
> I give up.
>
> None of the articles in the newgroups seem to help. And none of the articles
> on the web seem to help either.
>
> Here is my environemnt:
>
> jdk1.4.1_02
> Eclipse 2.1.0
> JRun 3.1
> W2K SP4
> US_export_policy.jar (strong encryption)
> local_policy.jar (strong encryption)
> java.security (security.provider.4=com.sun.crypto.provider.SunJCE)
> java.policy (unmodified)
>
> The following program works fine from the command line:
>
> import java.security.spec.KeySpec;
>
> import javax.crypto.spec.PBEKeySpec;
>
> import javax.crypto.SecretKey;
> import javax.crypto.SecretKeyFactory;
>
> public class FeCreateSessionKey
> {
> private static final String PBE_ALG = "PBEWithMD5AndDES";
>
> public static void main(String[] args)
> {
> try
> {
> KeySpec ks = new PBEKeySpec("fepassword".toCharArray());
> SecretKeyFactory skf = SecretKeyFactory.getInstance(PBE_ALG); <=
> This is the line that fails where PBE_ALG is set to PBEWithMD5AndDES (PBE
> alone also did not work) ...
> SecretKey sk = skf.generateSecret(ks);
> }
> catch(Exception e)
> {
> e.printStackTrace();
> }
> }
> }
>
> The same three lines in our application which is configured to run as a JRun
> server inside of Eclipse throws an exception each and every time:
>
> Algorithm PBEWithMD5AndDES not available.
>
> Dumping the system properties during runtime shows:
>
> java.class.path=d:\workspace\esprit\classes;d:\workspace\esp rit\lib\BO3rdPar
> ty.zip;d:\workspace\esprit\lib\BLC.zip;d:\workspace\esprit\l ib\Jama-1.0.1.ja
> r;d:\workspace\esprit\lib\jdom.jar;d:\workspace\esprit\lib\j Driver.jar;d:\wo
> rkspace\esprit\lib\opljni.jar;d:\workspace\esprit\lib\Phaos_ JCE_Provider.jar
> ;d:\workspace\esprit\lib\WS.zip;d:\workspace\esprit\lib\xerc es.jar;d:\worksp
> ace\esprit\lib\servlet.jar;D:\Program
> Files\Allaire\JRun\lib\xt.jar;D:\Program
> Files\Allaire\JRun\lib\default_objects.jar;D:\Program
> Files\Allaire\JRun\lib\ejipt.jar;D:\Program
> Files\Allaire\JRun\lib\ejipt_client.jar;D:\Program
> Files\Allaire\JRun\lib\ejipt_ejbeans.jar;D:\Program
> Files\Allaire\JRun\lib\ejipt_jms_client.jar;D:\Program
> Files\Allaire\JRun\lib\ejipt_tools.jar;D:\Program
> Files\Allaire\JRun\lib\install.jar;D:\Program
> Files\Allaire\JRun\lib\jrun.jar;D:\Program
> Files\Allaire\JRun\lib\jrun_ejbeans.jar;D:\Program
> Files\Allaire\JRun\lib\jrun_exports.jar;D:\Program
> Files\Allaire\JRun\lib\jrun_objects.jar;D:\Program
> Files\Allaire\JRun\lib\jsp.jar;D:\Program
> Files\Allaire\JRun\lib\rhino.jar;D:\Program
> Files\Allaire\JRun\lib\ssi.jar;D:\Program
> Files\Allaire\JRun\lib\wddx.jar;D:\Program
> Files\Allaire\JRun\lib\default_exports.jar;D:\Program
> Files\Allaire\JRun\lib\ext\US_export_policy.jar;D:\Program
> Files\Allaire\JRun\lib\ext\ejb.jar;D:\Program
> Files\Allaire\JRun\lib\ext\iioprt.jar;D:\Program
> Files\Allaire\JRun\lib\ext\jaxp.jar;D:\Program
> Files\Allaire\JRun\lib\ext\jce1_2_1.jar;D:\Program
> Files\Allaire\JRun\lib\ext\jcert.jar;D:\Program
> Files\Allaire\JRun\lib\ext\jdbc.jar;D:\Program
> Files\Allaire\JRun\lib\ext\jms.jar;D:\Program
> Files\Allaire\JRun\lib\ext\jndi.jar;D:\Program
> Files\Allaire\JRun\lib\ext\jnet.jar;D:\Program
> Files\Allaire\JRun\lib\ext\jsse.jar;D:\Program
> Files\Allaire\JRun\lib\ext\jta.jar;D:\Program
> Files\Allaire\JRun\lib\ext\local_policy.jar;D:\Program
> Files\Allaire\JRun\lib\ext\mail.jar;D:\Program
> Files\Allaire\JRun\lib\ext\parser.jar;D:\Program
> Files\Allaire\JRun\lib\ext\pop3.jar;D:\Program
> Files\Allaire\JRun\lib\ext\servlet.jar;D:\Program
> Files\Allaire\JRun\lib\ext\sunjce_provider.jar;D:\Program
> Files\Allaire\JRun\lib\ext\activation.jar;D:\Program
> Files\Allaire\JRun\servers\esprit-content-server\esprit-cont ent-app\web-inf\
> jsp\bin
>
> sun.boot.class.path=D:\downloads\jvm\1.4.1_02\jre\lib\rt.jar ;D:\downloads\jv
> m\1.4.1_02\jre\lib\sunrsasign.jar;D:\downloads\jvm\1.4.1_02\ jre\lib\jsse.jar
> ;D:\downloads\jvm\1.4.1_02\jre\lib\jce.jar;D:\downloads\jvm\ 1.4.1_02\jre\lib
> \charsets.jar;D:\downloads\jvm\1.4.1_02\jre\lib\ext\dnsns.ja r;D:\downloads\j
> vm\1.4.1_02\jre\lib\ext\ldapsec.jar;D:\downloads\jvm\1.4.1_0 2\jre\lib\ext\lo
> caledata.jar;D:\downloads\jvm\1.4.1_02\jre\lib\ext\sunjce_pr ovider.jar
>
> java.ext.dirs=D:\Downloads\JVM\1.4.1_02\jre\lib\ext
>
> java.security.policy=D:\Program Files\Allaire\JRun\lib\jrun.policy
>
> I only mention the java.security.policy because from the command line the
> program above did not have it set (and
> setting -Djava.security.policy=<nothing> from Eclipse did not help).
>
> My java.ext.dirs directory contains:
>
> dnsns.jar
> ldapsec.jar
> localedata.jar
> sunjce_provider.jar (which seems to be the important one)
>
> A search for installed JREs from Eclipse | Windows | Preferences | Java |
> Installed JREs | Search finds nothing on C or D even though I have the JRE
> installed under D:\Downloads\JVM\1.4.1_02.
>
> I'm running my program in Eclipse in debug mode.
>
> I have since renamed US_export_policy.jar, local_policy.jar, jce1_2_1.jar,
> jsse.jar, and sunjce_provider.jar found in the JRun lib\ext directory since
> these files can be found in D:\Downloads\JVM\1.4.1_02\lib and ext, which
> also did not work.
>
> There are no other version of US_export_policy.jar and/or local_policy.jar
> on my machine except for the versions found under
> D:\Downloads\JVM\1.4.1_02\jre\lib\security which are the strong envryption
> version (after the versions were renamed above).
>
> As a test within Eclipse I added the following right before the problem
> lines:
>
> java.security.Provider[] providers = java.security.Security.getProviders();
>
> for (int i = 0; i < providers.length; i++)
> {
> System.out.println(providers[i].getInfo());
>
> String name = providers[i].getName();
>
> if ("SunJCE".equals(name))
> {
> try
> {
> javax.crypto.SecretKeyFactory skf =
> javax.crypto.SecretKeyFactory.getInstance(PBE_ALG, providers[i]);
> }
> catch(Exception e)
> {
> e.printStackTrace();
> }
> }
> }
>
> Which threw a SecurityException:
>
> java.lang.SecurityException: The provider SunJCE may not be signed by a
> trusted party
>
>
> which I don't think is relevant but what is is the fact that the SunJCE
> provider is found and the Provider.getInfo for it returns:
>
> SunJCE Provider (implements DES, Triple DES, Blowfish, PBE, Diffie-Hellman,
> HMAC-MD5, HMAC-SHA1)
>
> Also returned were:
>
> Sun (Kerberos v5)
> Phaos Security Provider 1.0
> SUN (DSA key/parameter generation; DSA signing; SHA-1, MD5 digests;
> SecureRandom; X.509 certificates; JKS keystore; PKIX CertPathValidator; PKIX
> CertPathBuilder; LDAP, Collection CertStores)
> Sun JSSE provider(implements RSA Signatures, PKCS12, SunX509 key/trust
> factories, SSLv3, TLSv1)
> SUN's provider for RSA signatures
>
>
>
>
>
>
|
|
|
Re: Algorithm PBEWithMD5AndDES not available. [message #105634 is a reply to message #104897] |
Wed, 15 October 2003 17:49 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: sordell.financialengines.com
I'm going to add the following info to my post, but I found an article that
was able to help me.
It is an internal document so there are some reference to our products.
Hopefully, this won't
confuse things.
============================================================ ================
====================
Click next on the v1login page for Data Aggregation (a.k.a., DataAgg or DA)
results in the following exception in the content log:
fei.crypto.common.FeCryptoException: could not process key:
fei.crypto.common.FeCryptoException: could not create session key:
java.security.NoSuchAlgorithmException: Algorithm PBEWithMD5AndDES not
available
fei.crypto.common.FeCryptoException: could not process key:
fei.crypto.common.FeCryptoException: could not create session key:
java.security.NoSuchAlgorithmException: Algorithm PBEWithMD5AndDES not
available
at fei.crypto.common.FeKeyStore.getSecretKey
at fei.crypto.remauth.FeRemAuthUtil.encipherToken
at domain.link.FeAccountLinkManager._encryptAndFormatPassword
at domain.link.FeAccountLinkManager._link
at domain.link.FeAccountLinkManager.link
at content.bean.v1.FeV1LoginBean.$saveObject
at content.bean.edit.FeEditBean.stdUpdateProcessing
at content.bean.edit.FeEditBean.process
at jrun__esprit__screenscrape__FeV1Login2ejsp22._jspService
at allaire.jrun.jsp.HttpJSPServlet.service
at allaire.jrun.jsp.JSPServlet.service
at allaire.jrun.jsp.JSPServlet.service
at allaire.jrun.servlet.JRunSE.service
at allaire.jrun.session.JRunSessionService.service
at allaire.jrun.debug.StackManager.service
at allaire.jrun.servlet.JRunSE.runServlet
at allaire.jrun.servlet.JRunRequestDispatcher.forward
at content.http.FeContentServlet._forward
at content.http.FeContentServlet._forward
at content.http.FeContentServlet.doGet
at content.http.FeContentServlet.doPost
at javax.servlet.http.HttpServlet.service
at javax.servlet.http.HttpServlet.service
at allaire.jrun.servlet.JRunSE.service
at allaire.jrun.session.JRunSessionService.service
at allaire.jrun.debug.StackManager.service
at allaire.jrun.servlet.JRunSE.runServlet
at allaire.jrun.servlet.JRunRequestDispatcher.forward
at allaire.jrun.servlet.JRunSE.service
at allaire.jrun.servlet.JRunSE.service
at allaire.jrun.servlet.JvmContext.dispatch
at allaire.jrun.http.WebEndpoint.run
at allaire.jrun.ThreadPool.run
at allaire.jrun.WorkerThread.run
This is an Eclipse only problem. When running the content server outside of
Eclipse the problem does not occur.
The following article
( http://forum.java.sun.com/thread.jsp?thread=430078&forum =9&message=1964890)
documents what the fix is.
Here are the steps from Eclipse:
1. Click on 'Window'.
2. Click on 'Open Perspective'.
3. Click on 'Debug'.
4. Click on 'Run'.
5. Click on 'Debug'.
6. Click on 'Java Application'.
7. Click on 'esprit-content-server'.
8. Click on 'Classpath'.
9. Click on 'Bootstrap classes'.
10. Click on 'JRE System Library [1.4.1_02]'.
11. Click on 'Remove'.
12. Click on 'Add External JARs'.
13. Click on 'jce.jar'.
14. Click on 'jsse.jar'.
15. Click on 'rt.jar'.
16. Click on 'Open'.
17. Click on 'Apply'.
18. Click on 'Close'.
Note, the jar files in steps 13, 14, and 15 are located in your
%JAVA_HOME%\jre\lib directory.
Note, when the BO server starts it also attempts to create a
PBEWithMD5AndDES secret key factory so you need to make the same change to
the debug configuration of your BO server in Eclipse. Although, in this case
the exception is ignored and an innocuous error is written to the bo.log
(i.e., Error getting key- see FeDOBOServer._configureDecryptionSupport).
============================================================ ================
====================
Let me know if this helps you.
Also, know I have the knowledge to fix the issue, without the understanding
of why it worked- do you know why it worked?
"Shance Ordell" <sordell@financialengines.com> wrote in message
news:bmii3j$5lk$1@eclipse.org...
> I give up.
>
> None of the articles in the newgroups seem to help. And none of the
articles
> on the web seem to help either.
>
> Here is my environemnt:
>
> jdk1.4.1_02
> Eclipse 2.1.0
> JRun 3.1
> W2K SP4
> US_export_policy.jar (strong encryption)
> local_policy.jar (strong encryption)
> java.security (security.provider.4=com.sun.crypto.provider.SunJCE)
> java.policy (unmodified)
>
> The following program works fine from the command line:
>
> import java.security.spec.KeySpec;
>
> import javax.crypto.spec.PBEKeySpec;
>
> import javax.crypto.SecretKey;
> import javax.crypto.SecretKeyFactory;
>
> public class FeCreateSessionKey
> {
> private static final String PBE_ALG = "PBEWithMD5AndDES";
>
> public static void main(String[] args)
> {
> try
> {
> KeySpec ks = new PBEKeySpec("fepassword".toCharArray());
> SecretKeyFactory skf = SecretKeyFactory.getInstance(PBE_ALG);
<=
> This is the line that fails where PBE_ALG is set to PBEWithMD5AndDES (PBE
> alone also did not work) ...
> SecretKey sk = skf.generateSecret(ks);
> }
> catch(Exception e)
> {
> e.printStackTrace();
> }
> }
> }
>
> The same three lines in our application which is configured to run as a
JRun
> server inside of Eclipse throws an exception each and every time:
>
> Algorithm PBEWithMD5AndDES not available.
>
> Dumping the system properties during runtime shows:
>
>
java.class.path=d:\workspace\esprit\classes;d:\workspace\esp rit\lib\BO3rdPar
>
ty.zip;d:\workspace\esprit\lib\BLC.zip;d:\workspace\esprit\l ib\Jama-1.0.1.ja
>
r;d:\workspace\esprit\lib\jdom.jar;d:\workspace\esprit\lib\j Driver.jar;d:\wo
>
rkspace\esprit\lib\opljni.jar;d:\workspace\esprit\lib\Phaos_ JCE_Provider.jar
>
;d:\workspace\esprit\lib\WS.zip;d:\workspace\esprit\lib\xerc es.jar;d:\worksp
> ace\esprit\lib\servlet.jar;D:\Program
> Files\Allaire\JRun\lib\xt.jar;D:\Program
> Files\Allaire\JRun\lib\default_objects.jar;D:\Program
> Files\Allaire\JRun\lib\ejipt.jar;D:\Program
> Files\Allaire\JRun\lib\ejipt_client.jar;D:\Program
> Files\Allaire\JRun\lib\ejipt_ejbeans.jar;D:\Program
> Files\Allaire\JRun\lib\ejipt_jms_client.jar;D:\Program
> Files\Allaire\JRun\lib\ejipt_tools.jar;D:\Program
> Files\Allaire\JRun\lib\install.jar;D:\Program
> Files\Allaire\JRun\lib\jrun.jar;D:\Program
> Files\Allaire\JRun\lib\jrun_ejbeans.jar;D:\Program
> Files\Allaire\JRun\lib\jrun_exports.jar;D:\Program
> Files\Allaire\JRun\lib\jrun_objects.jar;D:\Program
> Files\Allaire\JRun\lib\jsp.jar;D:\Program
> Files\Allaire\JRun\lib\rhino.jar;D:\Program
> Files\Allaire\JRun\lib\ssi.jar;D:\Program
> Files\Allaire\JRun\lib\wddx.jar;D:\Program
> Files\Allaire\JRun\lib\default_exports.jar;D:\Program
> Files\Allaire\JRun\lib\ext\US_export_policy.jar;D:\Program
> Files\Allaire\JRun\lib\ext\ejb.jar;D:\Program
> Files\Allaire\JRun\lib\ext\iioprt.jar;D:\Program
> Files\Allaire\JRun\lib\ext\jaxp.jar;D:\Program
> Files\Allaire\JRun\lib\ext\jce1_2_1.jar;D:\Program
> Files\Allaire\JRun\lib\ext\jcert.jar;D:\Program
> Files\Allaire\JRun\lib\ext\jdbc.jar;D:\Program
> Files\Allaire\JRun\lib\ext\jms.jar;D:\Program
> Files\Allaire\JRun\lib\ext\jndi.jar;D:\Program
> Files\Allaire\JRun\lib\ext\jnet.jar;D:\Program
> Files\Allaire\JRun\lib\ext\jsse.jar;D:\Program
> Files\Allaire\JRun\lib\ext\jta.jar;D:\Program
> Files\Allaire\JRun\lib\ext\local_policy.jar;D:\Program
> Files\Allaire\JRun\lib\ext\mail.jar;D:\Program
> Files\Allaire\JRun\lib\ext\parser.jar;D:\Program
> Files\Allaire\JRun\lib\ext\pop3.jar;D:\Program
> Files\Allaire\JRun\lib\ext\servlet.jar;D:\Program
> Files\Allaire\JRun\lib\ext\sunjce_provider.jar;D:\Program
> Files\Allaire\JRun\lib\ext\activation.jar;D:\Program
>
Files\Allaire\JRun\servers\esprit-content-server\esprit-cont ent-app\web-inf\
> jsp\bin
>
>
sun.boot.class.path=D:\downloads\jvm\1.4.1_02\jre\lib\rt.jar ;D:\downloads\jv
>
m\1.4.1_02\jre\lib\sunrsasign.jar;D:\downloads\jvm\1.4.1_02\ jre\lib\jsse.jar
>
;D:\downloads\jvm\1.4.1_02\jre\lib\jce.jar;D:\downloads\jvm\ 1.4.1_02\jre\lib
>
\charsets.jar;D:\downloads\jvm\1.4.1_02\jre\lib\ext\dnsns.ja r;D:\downloads\j
>
vm\1.4.1_02\jre\lib\ext\ldapsec.jar;D:\downloads\jvm\1.4.1_0 2\jre\lib\ext\lo
> caledata.jar;D:\downloads\jvm\1.4.1_02\jre\lib\ext\sunjce_pr ovider.jar
>
> java.ext.dirs=D:\Downloads\JVM\1.4.1_02\jre\lib\ext
>
> java.security.policy=D:\Program Files\Allaire\JRun\lib\jrun.policy
>
> I only mention the java.security.policy because from the command line the
> program above did not have it set (and
> setting -Djava.security.policy=<nothing> from Eclipse did not help).
>
> My java.ext.dirs directory contains:
>
> dnsns.jar
> ldapsec.jar
> localedata.jar
> sunjce_provider.jar (which seems to be the important one)
>
> A search for installed JREs from Eclipse | Windows | Preferences | Java |
> Installed JREs | Search finds nothing on C or D even though I have the JRE
> installed under D:\Downloads\JVM\1.4.1_02.
>
> I'm running my program in Eclipse in debug mode.
>
> I have since renamed US_export_policy.jar, local_policy.jar, jce1_2_1.jar,
> jsse.jar, and sunjce_provider.jar found in the JRun lib\ext directory
since
> these files can be found in D:\Downloads\JVM\1.4.1_02\lib and ext, which
> also did not work.
>
> There are no other version of US_export_policy.jar and/or local_policy.jar
> on my machine except for the versions found under
> D:\Downloads\JVM\1.4.1_02\jre\lib\security which are the strong envryption
> version (after the versions were renamed above).
>
> As a test within Eclipse I added the following right before the problem
> lines:
>
> java.security.Provider[] providers =
java.security.Security.getProviders();
>
> for (int i = 0; i < providers.length; i++)
> {
> System.out.println(providers[i].getInfo());
>
> String name = providers[i].getName();
>
> if ("SunJCE".equals(name))
> {
> try
> {
> javax.crypto.SecretKeyFactory skf =
> javax.crypto.SecretKeyFactory.getInstance(PBE_ALG, providers[i]);
> }
> catch(Exception e)
> {
> e.printStackTrace();
> }
> }
> }
>
> Which threw a SecurityException:
>
> java.lang.SecurityException: The provider SunJCE may not be signed by a
> trusted party
>
>
> which I don't think is relevant but what is is the fact that the SunJCE
> provider is found and the Provider.getInfo for it returns:
>
> SunJCE Provider (implements DES, Triple DES, Blowfish, PBE,
Diffie-Hellman,
> HMAC-MD5, HMAC-SHA1)
>
> Also returned were:
>
> Sun (Kerberos v5)
> Phaos Security Provider 1.0
> SUN (DSA key/parameter generation; DSA signing; SHA-1, MD5 digests;
> SecureRandom; X.509 certificates; JKS keystore; PKIX CertPathValidator;
PKIX
> CertPathBuilder; LDAP, Collection CertStores)
> Sun JSSE provider(implements RSA Signatures, PKCS12, SunX509 key/trust
> factories, SSLv3, TLSv1)
> SUN's provider for RSA signatures
>
>
>
>
>
>
|
|
|
Goto Forum:
Current Time: Sat Sep 07 11:09:32 GMT 2024
Powered by FUDForum. Page generated in 0.03763 seconds
|