If you're heavy on security you should be using JDK 1.4.0 and it will
cut out this middle step you are experiencing.
Technically, the JCE is deprecated in favor of the JDK itself since
1.4.0 incorporated the security work.

Probably the preferred method would be to inside your constructor put 
  java.security.Security.addProvider(new sun.crypto.provider.SunJCE());

I have a class for encryption and a class for decryption in the
constructor for each I dynamically load whatever provider I need.

John Warner
Senior Engineer
Gryphon Technologies - Naval Research Laboratory


-----Original Message-----
From: Debra Mendelson, CCE [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, April 25, 2002 11:01 AM
To: [EMAIL PROTECTED]
Subject: Using JCE with Tomcat 4.0

I am trying to do some encryption and decryption inside of my servlets.

I am running JDK 1.3 with Tomcat 4.0.3  I have added jce1_2-do.jar into
my
common/lib subdirectory in Tomcat and introduced it to my JDK by adding
the
line

security.provider.3=com.sun.crypto.provider.SunJCE

to /usr/java/jdk1.3.1_02/jre/lib/security/java.security

This all works fine when I run crypto code from the command line.

When I run the same code from within Tomcat I get exceptions that
suggest it
can't find the correct algorithm.

Does anyone know what I need to do inside of Tomcat to either give
myself
permission to use this class package or to find it?


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>



--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to