JDK-6886439 : Different Jars signed with tsa (Timestamping Authority) doesn't work with JNLP
  • Type: Bug
  • Component: deploy
  • Sub-Component: webstart
  • Affected Version: 6u14
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2009-09-29
  • Updated: 2011-02-16
  • Resolved: 2009-09-29
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
Java HotSpot(TM) Client VM (build 14.0-b16, mixed mode, sharing)

The javaws launcher version is 1.6.0_14' and JRE version is '1.6.0_14-b08' . One thing I would like to point is,����the problem depends on the launcher version (that is from which version of java version/installation 'javaws' command is used)��and not on the JRE version specified in the JNLP file or being used.
������ The full output of 'java -version' is 
��
java version "1.6.0_14"
Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
Java HotSpot(TM) Client VM (build 14.0-b16, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]

A DESCRIPTION OF THE PROBLEM :
While using JNLP if jar files are signed by same signer, but using tsa(Timestamping Authority) while signing

It gives error

#### Java Web Start Error:
#### JAR resources in JNLP file are not signed by same certificate


STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
compile and package Package 'JNLPMain' class (given in source code section) in MyMainJNLP.jar
compile and package Package 'SupportClass' class (given in source code section) in mySupportJar.jar
put them in 'C:\dist' folder
sign the jars with proper certificate and tsa(Timestamping Authority) for example(replace proper certificate and other details)

jarsigner -keystore D:\ks.p12 -storepass mypwd1 -storetype pkcs12 -tsa https://timestamp.geotrust.com/tsa "C:\dist\MyMainJNLP.jar" myAlias

jarsigner -keystore D:\ks.p12 -storepass mypwd1 -storetype pkcs12 -tsa https://timestamp.geotrust.com/tsa "C:\dist\mySupportJar.jar" myAlias

Run the JNLP provided in source code secion

It will give the console with error as provided in error secion.

If the tsa part is removed while signing jar, it works fine!


EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
This tipe of jars signed with tsa should work
ACTUAL -
Gives error as explained

ERROR MESSAGES/STACK TRACES THAT OCCUR :
Java Web Start 1.6.0_14
Using JRE version 1.6.0_14-b08 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\stamboli
----------------------------------------------------
c:   clear console window
f:   finalize objects on finalization queue
g:   garbage collect
h:   display this help message
m:   print memory usage
o:   trigger logging
p:   reload proxy configuration
q:   hide console
r:   reload policy configuration
s:   dump system and deployment properties
t:   dump thread list
v:   dump thread stack
0-5: set trace level to <n>
----------------------------------------------------
#### Java Web Start Error:
#### JAR resources in JNLP file are not signed by same certificate


REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
package jnlpTest;

import test.SupportClass;

public class JNLPMain {
    public static void main(String[] args)
    {
        SupportClass.printHello();
    }
}


package test;

public class SupportClass {
    public static void printHello()
    {
        System.out.println("Hello!");
    }
}

JNLP file

<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="" href="">
    <information>
        <title>Bug Report </title>
        <vendor>Test</vendor>
    </information>

    <security>
       <all-permissions/>
    </security>

    <resources>
        <jar href="file:///C:\dist\MyMainJNLP.jar" />
        <jar href="file:///C:\dist\mySupportJar.jar"/>
    </resources>
    <application-desc main-class="jnlpTest.JNLPMain"/>
</jnlp>

---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
Use
<extension href=="file:///C:\dist\mySupportJar.jar" />

Which I don't think is proper way!

Which creates different session, and give other problems for SSO (same is true for jar tag, another bug to report!)

Comments
EVALUATION This is caused by the same bug in 6846531, which has been fixed in JRE 6u15.
29-09-2009