Hi developers (e.g. Milos )
during investigation of security warnings in our webstart application,
I've found out that the branding jars will not be signed. After looking
in the source of the plugin I noticed that the signing section of the
jars are comment out and additionally I found maybe the reason why they
are commented out, the wrong FileSet instance (fs instead of set) was
given to the signing task.
kind regards
Manfred
Index: src/main/java/org/codehaus/mojo/nbm/CreateWebstartAppMojo.java
===================================================================
--- src/main/java/org/codehaus/mojo/nbm/CreateWebstartAppMojo.java (revision 12524)
+++ src/main/java/org/codehaus/mojo/nbm/CreateWebstartAppMojo.java (working copy)
@@ -348,17 +348,16 @@
FileUtils.copyFile( source, dest );
brandRefs.append( " <jar href=\'branding/" + dest.getName() + "\'/>\n" );
}
- //signing of branding items doens't work for some reason.
- // -> branding.jnlp with <security/>
-// signTask = (SignJar)antProject.createTask("signjar");
-// signTask.setKeystore(keystore);
-// signTask.setStorepass(keystorepassword);
-// signTask.setAlias(keystorealias);
-// FileSet set = new FileSet();
-// set.setDir(brandingDir);
-// set.setIncludes("*.jar");
-// signTask.addFileset(fs);
-// signTask.execute();
+
+ signTask = (SignJar)antProject.createTask("signjar");
+ signTask.setKeystore(keystore);
+ signTask.setStorepass(keystorepassword);
+ signTask.setAlias(keystorealias);
+ FileSet set = new FileSet();
+ set.setDir(brandingDir);
+ set.setIncludes("*.jar");
+ signTask.addFileset(set);
+ signTask.execute();
}
File brandingJnlp = new File(
Index: src/main/resources/branding.jnlp
===================================================================
--- src/main/resources/branding.jnlp (revision 12524)
+++ src/main/resources/branding.jnlp (working copy)
@@ -7,7 +7,7 @@
<description>${app.description}</description>
<icon href="${app.icon}"/>
</information>
- <security/>
+ <security><all-permissions/></security>
<resources>
${jnlp.branding.jars}
</resources>
Index: src/main/resources/master.jnlp
===================================================================
--- src/main/resources/master.jnlp (revision 12524)
+++ src/main/resources/master.jnlp (working copy)
@@ -10,7 +10,7 @@
<security><all-permissions/></security>
<resources>
<!-- The following property is needed when running with unsigned jars: -->
- <property name="netbeans.jnlp.fixPolicy" value="${netbeans.jnlp.fixPolicy}"/>
+<!-- <property name="netbeans.jnlp.fixPolicy" value="${netbeans.jnlp.fixPolicy}"/>-->
<extension name='branding' href='branding.jnlp' />
<j2se version="1.5+"/>
<jar href="startup.jar"/>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email