-
Bug
-
Resolution: Won't Fix
-
P3
-
None
-
1.4.0
-
x86
-
windows_2000
###@###.### 2002-04-11
J2SE Version (please include all output from java -version flag):
java version "1.4.1-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-beta-b06)
Java HotSpot(TM) Client VM (build 1.4.1-beta-b06, mixed mode)
Does this problem occur on J2SE 1.3 or 1.4? Yes / No (pick one)
1.4
Operating System Configuration Information (be specific):
Microsoft Windows 2000, 5.0.2195, Service Pack 2 Build 2195
Hardware Configuration Information (be specific):
AMD Athlon
x86 Family 6 Model 4 Stepping 2 AuthenticAMD ~900 MHz
261.684 KB RAM
Bug Description:
When signing a JCE provider file a second time (by means of some
other certificate) it seems that the provider verification process
hangs for some reason.
Steps to Reproduce (be specific):
Attached two versions of our JCE provider -
iaik_jce_signed.jar: signed with the code signing certificate from SUN.
iaik_jce_signed_2.jar: is signed a second time by means of some other
(not SUN) certificate.
The TestCipher class shall demonstrate the problem:
public static void main(String[] args) {
int index = 2;
if (args.length == 1) {
try {
index = Integer.parseInt(args[0]);
} catch (Exception ex) {
// ignore
}
}
try {
IAIK iaikProv = new IAIK();
Security.insertProviderAt(iaikProv, index);
System.out.println("Added provider " + iaikProv + " at index " + index);
Cipher c = Cipher.getInstance("DES/CBC/PKCS5Padding","IAIK");
System.out.println(c.getAlgorithm() + " from provider " + c.getProvider() + "\n");
} catch (Exception ex) {
ex.printStackTrace();
}
}
}
index is set to 2 because when adding IAIK as first provider it
cannot be authenticated because the problem in the provider verification
mechanism.(bug4504355)
When running the program above with iaik_jce_signed.jar in the
classpath, the program successfully completes giving the
following output:
Added provider IAIK version 3.0 at index 2
DES/CBC/PKCS5Padding from provider IAIK version 3.0
However, when using iaik_jce_signed_2.jar, program execution seems
to hang after prompting that IAIK has been added as provider:
Thread dump:
^\Full thread dump Java HotSpot(TM) Client VM (1.4.1-beta-b08 mixed mode):
"Signal Dispatcher" daemon prio=10 tid=0xb7598 nid=0x9 waiting on condition [0..0]
"Finalizer" daemon prio=8 tid=0xb3020 nid=0x6 in Object.wait() [fa381000..fa3819a0]
at java.lang.Object.wait(Native Method)
- waiting on <f2783360> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:111)
- locked <f2783360> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:127)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
"Reference Handler" daemon prio=10 tid=0xb1780 nid=0x5 in Object.wait() [fdf81000..fdf819a0]
at java.lang.Object.wait(Native Method)
- waiting on <f27833c8> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:426)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:113)
- locked <f27833c8> (a java.lang.ref.Reference$Lock)
"main" prio=5 tid=0x2c290 nid=0x1 in Object.wait() [ffbed000..ffbee680]
at java.lang.Object.wait(Native Method)
- waiting on <f27937b8> (a java.util.Vector)
at java.lang.Object.wait(Object.java:426)
at javax.crypto.SunJCE_b.b(DashoA6275)
- locked <f27937b8> (a java.util.Vector)
at javax.crypto.SunJCE_b.a(DashoA6275)
at javax.crypto.SunJCE_b.a(DashoA6275)
at javax.crypto.Cipher.getInstance(DashoA6275)
at iaik.security.rsa.RSASignature.engineInitVerify(Unknown Source)
at java.security.Signature.initVerify(Signature.java:297)
at sun.security.x509.X509CertImpl.verify(X509CertImpl.java:394)
at sun.security.x509.X509CertImpl.verify(X509CertImpl.java:363)
at javax.crypto.SunJCE_d.a(DashoA6275)
at javax.crypto.SunJCE_d.a(DashoA6275)
at javax.crypto.SunJCE_d.a(DashoA6275)
at javax.crypto.SunJCE_d.verify(DashoA6275)
at javax.crypto.SunJCE_b.a(DashoA6275)
at javax.crypto.SunJCE_b.a(DashoA6275)
at javax.crypto.Cipher.getInstance(DashoA6275)
at TestCipher.main(TestCipher.java:26)
"VM Thread" prio=5 tid=0xb0330 nid=0x4 runnable
"VM Periodic Task Thread" prio=10 tid=0xb62f8 nid=0x7 waiting on condition
"Suspend Checker Thread" prio=10 tid=0xb6c48 nid=0x8 runnable
The attached run.cmd may be used for simulating the problem. It
executes TestCipher two times: the first time with iaik_jce_signed.jar
and the second time with iaik_jce_signed_2.jar.