I think we've encountered the same problems already found by Vincenzo in
trying to make smime mailets java 1.3 compatible.

If I understand correctly we can create a similar source file for java 1.4
and java 1.3 but not equal!. We can use for sure the java 1.3 version with
newer VM but it will not work the same as the original java 1.4 version.

The problem is that to be java 1.3 compatible we bind to
"org.bouncycastle.jce" specific classes and not to the "java.security.cert"
interfaces. 

This mean that we would not get support for different JCE provided by the VM
and we also lose the interoperability (if needed) with other JCE components.

So we can process in different ways:

a) create only the java 1.3 release (it will work in 1.4 and 1.5 but will
not use native JCE services)

b) create only the java 1.4 release (it will work only in java 1.4 and 1.5,
will use JCE native providers if needed and the BC one for SMIME stuff)

c) create both with a preprocessing script to switch the "import" sections (
java.security <=> org.bouncycastle.jce )

If I understand correctly Vincenzo followed the "a)" solution. We should
comment the:
import org.bouncycastle.jce.*;
import org.bouncycastle.jce.cert.*;
And uncomment
Import java.security.cert.*;
in order to let his code to use underlying JCE providers.

Furthermore there are different bouncycastle jars for every java version:
does anyone know why?
http://www.bouncycastle.org/latest_releases.html
I'm not sure but we probably need to compile against bcprov-jdk15-129.jar
and distribute this jar to have jdk1.5 compatibility, compile and distribute
with bcprov-jdk14-129.jar for jdk1.4 compatibility, and compile and
distribute against bcprov-jdk13-129.jar+jce-jdk13-129.jar for jdk1.3
compatibility. The latter will work in every VM but will not make use of
newer algorythm/functions provided by JCE in java 1.4 and 1.5 ?!?

Stefano


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to