title: Keep getting "JNLPSigningException [Failed to validate signing of launch file]" when launching a JNLP signed by template
body: <p>We decided to sign our JNLP files by following <a href="https://docs.oracle.com/javase/7/docs/technotes/guides/jweb/security/signedJNLP.html" rel="nofollow">this</a> oracle guide. Since we have different JNLPs, we went for the second approach (Signing a JAR file with a JNLP template).</p>
  
  <p>Here's the code we extracted into the template:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;jnlp spec="1.0+" codebase="*" href="*"&gt;
    &lt;information&gt;
      &lt;title&gt;*&lt;/title&gt;
      &lt;vendor&gt;My vendor&lt;/vendor&gt;
      &lt;description&gt;My description&lt;/description&gt;
      &lt;icon href="splash.jpg" kind="splash" width="700" height="400" size="115258"/&gt;
      &lt;offline-allowed /&gt;
      &lt;shortcut&gt;
        &lt;menu submenu="My submenu"/&gt;
      &lt;/shortcut&gt;
    &lt;/information&gt;
  
    &lt;security&gt;
      &lt;all-permissions/&gt;
    &lt;/security&gt;
  
    &lt;resources locale="en es ja"&gt;
      &lt;j2se version="1.6+" initial-heap-size="128m" max-heap-size="384m" href="http://java.sun.com/products/autodl/j2se"/&gt;
      &lt;jar href="myjar.jar" main="true" download="lazy" part="core" size="*"/&gt;
      &lt;jar href="lib/commons-lang-2.6.jar" download="lazy" part="commons" size="297085"/&gt;
      ...
      &lt;jar href="lib/trident-6.0.jar" download="lazy" part="core" size="114496"/&gt;
      &lt;property name="jnlp.myProperty" value="*"/&gt;
      &lt;property name="log4j.configuration" value="*"/&gt;
    &lt;/resources&gt;
  
    &lt;application-desc main-class="com.mycom.myapp.MyClass"&gt;
    &lt;/application-desc&gt;
  &lt;/jnlp&gt;
  </code></pre>
  
  <p>... and here's one of the JNLPs we are actually using:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;jnlp spec="1.0+" codebase="http://mylocation.mycom.com/jnlp/myapp/" href="myapp.jnlp"&gt;
    &lt;information&gt;
      &lt;title&gt;My App - Production version&lt;/title&gt;
      &lt;vendor&gt;My vendor&lt;/vendor&gt;
      &lt;description&gt;My description&lt;/description&gt;
      &lt;icon href="splash.jpg" kind="splash" width="700" height="400" size="115258"/&gt;
      &lt;offline-allowed /&gt;
      &lt;shortcut&gt;
        &lt;menu submenu="My submenu"/&gt;
      &lt;/shortcut&gt;
    &lt;/information&gt;
  
    &lt;security&gt;
      &lt;all-permissions/&gt;
    &lt;/security&gt;
  
    &lt;resources locale="en es ja"&gt;
      &lt;j2se version="1.6+" initial-heap-size="128m" max-heap-size="384m" href="http://java.sun.com/products/autodl/j2se"/&gt;
      &lt;jar href="myjar.jar" main="true" download="lazy" part="core" size="4189501"/&gt;
      &lt;jar href="lib/commons-lang-2.6.jar" download="lazy" part="commons" size="297085"/&gt;
      ...
      &lt;jar href="lib/trident-6.0.jar" download="lazy" part="core" size="114496"/&gt;
      &lt;property name="jnlp.myProperty" value="http://mylocation.mycom.com/jnlp/myapp/MyApp.properties"/&gt;
      &lt;property name="log4j.configuration" value="http://mylocation.mycom.com/jnlp/myapp/log4j.xml"/&gt;
    &lt;/resources&gt;
  
    &lt;application-desc main-class="com.mycom.myapp.MyClass"&gt;
    &lt;/application-desc&gt;
  &lt;/jnlp&gt;
  </code></pre>
  
  <p>notice that I used the wildcard(<code>*</code>) for:</p>
  
  <ol>
  <li>The codebase attribute in tag jnlp</li>
  <li>The href attribute in tag jnlp</li>
  <li>Content inside title tags</li>
  <li>attribute size in jar tag</li>
  <li>the value of the two properties</li>
  </ol>
  
  <p>I put the template inside the appropriate <code>JNLP-INF</code> folder (with the appropriate name as well) and we signed the JAR after that. However, we keep getting a <code>JNLPSigningException</code> with the following message:</p>
  
  <blockquote>
    <p>Failed to validate signing of launch file. The signed version does not match the downloaded version.</p>
  </blockquote>
  
  <p>Does anyone have an idea of what am I missing?</p>