diff options
author | Saad Mohammad <[email protected]> | 2012-07-03 17:00:49 -0400 |
---|---|---|
committer | Saad Mohammad <[email protected]> | 2012-07-03 17:00:49 -0400 |
commit | bd1903df14f03ad4893bd19317ff7d99817de2bb (patch) | |
tree | 6cc3632d78010e3e67c2135715fc12d0442f5621 /tests/reproducers | |
parent | d515e6d3bbc399f7d6bb6ad7bf3d39fb22f252f1 (diff) |
Fix PR1040, PR1041, PR1042: Allows signed jars to function correctly using extensions
Diffstat (limited to 'tests/reproducers')
12 files changed, 728 insertions, 0 deletions
diff --git a/tests/reproducers/signed/ExtensionJnlp/resources/UsesSignedJar.jnlp b/tests/reproducers/signed/ExtensionJnlp/resources/UsesSignedJar.jnlp new file mode 100644 index 0000000..e76c643 --- /dev/null +++ b/tests/reproducers/signed/ExtensionJnlp/resources/UsesSignedJar.jnlp @@ -0,0 +1,63 @@ +<!-- + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. + +*********************************************************************** +Uses only the main jar as its resources (SignedJarResource) ; used for testing to check if the jar +exists with main +*********************************************************************** + --> +<?xml version="1.0" encoding="utf-8"?> +<jnlp spec="1.0" href="UsesSignedJar.jnlp" codebase="."> + <information> + <title>UsesSignedJar</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>UsesSignedJar</description> + <offline/> + </information> + + <security> + <all-permissions/> + </security> + + <resources> + <j2se version="1.6+"/> + <jar href="SignedJarResource.jar" main="true"/> + </resources> + + <application-desc main-class="SignedJarResource"> + </application-desc> +</jnlp> diff --git a/tests/reproducers/signed/ExtensionJnlp/resources/UsesSignedJarExtension.jnlp b/tests/reproducers/signed/ExtensionJnlp/resources/UsesSignedJarExtension.jnlp new file mode 100644 index 0000000..dafca25 --- /dev/null +++ b/tests/reproducers/signed/ExtensionJnlp/resources/UsesSignedJarExtension.jnlp @@ -0,0 +1,62 @@ +<!-- + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. + +*********************************************************************** +Uses only SignedJarExtension as its resources +*********************************************************************** + --> +<?xml version="1.0" encoding="utf-8"?> +<jnlp spec="1.0" href="UsesSignedJarExtension.jnlp" codebase="."> + <information> + <title>UseSignedJarExtension</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>UseSignedJarExtension</description> + <offline/> + </information> + + <security> + <all-permissions/> + </security> + + <resources> + <j2se version="1.6+"/> + <extension name="SignedJarExtension" href="./SignedJarExtension.jnlp"/> + </resources> + + <application-desc main-class="SignedJarResource"> + </application-desc> +</jnlp> diff --git a/tests/reproducers/signed/ExtensionJnlp/resources/UsesSignedJnlp.jnlp b/tests/reproducers/signed/ExtensionJnlp/resources/UsesSignedJnlp.jnlp new file mode 100644 index 0000000..34c1b84 --- /dev/null +++ b/tests/reproducers/signed/ExtensionJnlp/resources/UsesSignedJnlp.jnlp @@ -0,0 +1,62 @@ +<!-- + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. + +*********************************************************************** +Uses only MatchingSignedJnlpExtension as its resources +*********************************************************************** + --> +<?xml version="1.0" encoding="utf-8"?> +<jnlp spec="1.0" href="UsesSignedJnlp.jnlp" codebase="."> + <information> + <title>UsesSignedJnlp</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>UsesSignedJnlp</description> + <offline/> + </information> + + <security> + <all-permissions/> + </security> + + <resources> + <j2se version="1.6+"/> + <extension name="MatchingSignedJnlpExtension" href="./MatchingSignedJnlpExtension.jnlp"/> + </resources> + + <application-desc main-class="SignedJnlpResource"> + </application-desc> +</jnlp> diff --git a/tests/reproducers/signed/ExtensionJnlp/resources/UsesSignedJnlpExtension.jnlp b/tests/reproducers/signed/ExtensionJnlp/resources/UsesSignedJnlpExtension.jnlp new file mode 100644 index 0000000..00bb1db --- /dev/null +++ b/tests/reproducers/signed/ExtensionJnlp/resources/UsesSignedJnlpExtension.jnlp @@ -0,0 +1,62 @@ +<!-- + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. + +*********************************************************************** +Uses only UnmatchingSignedJnlpExtension as its resources +*********************************************************************** + --> +<?xml version="1.0" encoding="utf-8"?> +<jnlp spec="1.0" href="UsesSignedJnlpExtension.jnlp" codebase="."> + <information> + <title>UsesSignedJnlpExtension</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>UsesSignedJnlpExtension</description> + <offline/> + </information> + + <security> + <all-permissions/> + </security> + + <resources> + <j2se version="1.6+"/> + <extension name="UnmatchingSignedJnlpExtension" href="./UnmatchingSignedJnlpExtension.jnlp"/> + </resources> + + <application-desc main-class="SignedJnlpResource"> + </application-desc> +</jnlp> diff --git a/tests/reproducers/signed/ExtensionJnlp/resources/UsesSignedJnlpJarAndSignedJarExtension.jnlp b/tests/reproducers/signed/ExtensionJnlp/resources/UsesSignedJnlpJarAndSignedJarExtension.jnlp new file mode 100644 index 0000000..df74e37 --- /dev/null +++ b/tests/reproducers/signed/ExtensionJnlp/resources/UsesSignedJnlpJarAndSignedJarExtension.jnlp @@ -0,0 +1,63 @@ +<!-- + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. + +*********************************************************************** +File contains a jar and an extension jnlp (with the main jar) for its resources +*********************************************************************** + --> +<?xml version="1.0" encoding="utf-8"?> +<jnlp spec="1.0" href="UsesSignedJnlpJarAndSignedJarExtension.jnlp" codebase="."> + <information> + <title>UsesSignedJnlpJarAndSignedJarExtension</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>UsesSignedJnlpJarAndSignedJarExtension</description> + <offline/> + </information> + + <security> + <all-permissions/> + </security> + + <resources> + <j2se version="1.6+"/> + <jar href="SignedJnlpResource.jar" main="false"/> + <extension name="SignedJarExtension" href="./SignedJarExtension.jnlp"/> + </resources> + + <application-desc main-class="SignedJarResource"> + </application-desc> +</jnlp> diff --git a/tests/reproducers/signed/ExtensionJnlp/testcases/ExtensionJnlpTest.java b/tests/reproducers/signed/ExtensionJnlp/testcases/ExtensionJnlpTest.java new file mode 100644 index 0000000..385e937 --- /dev/null +++ b/tests/reproducers/signed/ExtensionJnlp/testcases/ExtensionJnlpTest.java @@ -0,0 +1,86 @@ +/* ExtensionJnlpTest.java +Copyright (C) 2012 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. + */ + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import net.sourceforge.jnlp.ServerAccess; +import net.sourceforge.jnlp.annotations.Bug; + +import org.junit.Assert; +import org.junit.Test; + +public class ExtensionJnlpTest { + + private static ServerAccess server = new ServerAccess(); + private final List<String> l = Collections.unmodifiableList(Arrays.asList(new String[] { "-Xtrustall" })); + private final String jarOutput = "Running SignedJarResource.."; + private final String signedJnlpException = "net.sourceforge.jnlp.LaunchException: Fatal: Application Error: " + + "The signed JNLP file did not match the launching JNLP file. Missing Resource: Signed Application " + + "did not match launching JNLP File"; + + @Test + public void checkingForRequiredResources() throws Exception { + ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/UsesSignedJar.jnlp"); + Assert.assertTrue("Could not locate SignedJarResource class within SignedJarResource jar", pr.stdout.contains(jarOutput)); + + String s = "Running SignedJnlpResource.."; + pr = server.executeJavawsHeadless(l, "/UsesSignedJnlp.jnlp"); + Assert.assertTrue("Could not locate SignedJnlpResource class within SignedJnlpResource jar", pr.stdout.contains(s)); + } + + @Bug(id = "PR1040") + @Test + public void usingSignedExtension() throws Exception { + ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/UsesSignedJarExtension.jnlp"); + Assert.assertTrue("Stdout should contain " + jarOutput + " but did not", pr.stdout.contains(jarOutput)); + } + + @Bug(id = "PR1041") + @Test + public void mainJarInExtension() throws Exception { + ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/UsesSignedJnlpJarAndSignedJarExtension.jnlp"); + Assert.assertTrue("Stdout should contain " + jarOutput + " but did not", pr.stdout.contains(jarOutput)); + } + + @Bug(id = "PR1042") + @Test + public void checkingSignedJnlpInExtension() throws Exception { + ServerAccess.ProcessResult pr = server.executeJavawsHeadless(l, "/UsesSignedJnlpExtension.jnlp"); + Assert.assertTrue("Stdout should contain " + signedJnlpException + " but did not", pr.stderr.contains(signedJnlpException)); + } +} diff --git a/tests/reproducers/signed/SignedJarResource/resources/SignedJarExtension.jnlp b/tests/reproducers/signed/SignedJarResource/resources/SignedJarExtension.jnlp new file mode 100644 index 0000000..36c5d7b --- /dev/null +++ b/tests/reproducers/signed/SignedJarResource/resources/SignedJarExtension.jnlp @@ -0,0 +1,62 @@ +<!-- + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. + +*********************************************************************** +This file is used as an extension jnlp for the launching jnlp's resource - contains +SignedJarResource class within SignedJarResource.jar +*********************************************************************** + --> +<?xml version="1.0" encoding="utf-8"?> +<jnlp spec="1.0" href="SignedJarExtension.jnlp" codebase="."> + <information> + <title>SignedJarExtension</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>SignedJarExtension</description> + <offline/> + </information> + + <security> + <all-permissions/> + </security> + + <resources> + <j2se version="1.6+"/> + <jar href="SignedJarResource.jar" main="true"/> + </resources> + + <component-desc /> +</jnlp> diff --git a/tests/reproducers/signed/SignedJarResource/srcs/SignedJarResource.java b/tests/reproducers/signed/SignedJarResource/srcs/SignedJarResource.java new file mode 100644 index 0000000..7ef4927 --- /dev/null +++ b/tests/reproducers/signed/SignedJarResource/srcs/SignedJarResource.java @@ -0,0 +1,43 @@ +/* SignedJarResource.java +Copyright (C) 2012 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. + */ + +public class SignedJarResource { + + public static void main(String[] args){ + System.out.println("Running SignedJarResource.."); + } +} diff --git a/tests/reproducers/signed/SignedJnlpResource/resources/MatchingSignedJnlpExtension.jnlp b/tests/reproducers/signed/SignedJnlpResource/resources/MatchingSignedJnlpExtension.jnlp new file mode 100644 index 0000000..06f98bc --- /dev/null +++ b/tests/reproducers/signed/SignedJnlpResource/resources/MatchingSignedJnlpExtension.jnlp @@ -0,0 +1,62 @@ +<!-- + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. + +*********************************************************************** +This file is used as an extension jnlp for the launching jnlp's resource - contains main within +SignedJnlpResource.jar which matches the signed jnlp +*********************************************************************** + --> +<?xml version="1.0" encoding="utf-8"?> +<jnlp spec="1.0" href="MatchingSignedJnlpExtension.jnlp" codebase="."> + <information> + <title>MATCHES SIGNED JNLP</title> + <vendor>IcedTea</vendor> + <homepage href="MATCHES_SIGNED_JNLP"/> + <description>MATCHES SIGNED JNLP</description> + <offline/> + </information> + + <security> + <all-permissions/> + </security> + + <resources> + <j2se version="1.6+"/> + <jar href="SignedJnlpResource.jar" main="true"/> + </resources> + + <component-desc /> +</jnlp> diff --git a/tests/reproducers/signed/SignedJnlpResource/resources/UnmatchingSignedJnlpExtension.jnlp b/tests/reproducers/signed/SignedJnlpResource/resources/UnmatchingSignedJnlpExtension.jnlp new file mode 100644 index 0000000..d47d6b6 --- /dev/null +++ b/tests/reproducers/signed/SignedJnlpResource/resources/UnmatchingSignedJnlpExtension.jnlp @@ -0,0 +1,62 @@ +<!-- + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. + +*********************************************************************** +This file is used as an extension jnlp for the launching jnlp's resource - contains main within +SignedJnlpResource.jar which does not match the signed jnlp +*********************************************************************** + --> +<?xml version="1.0" encoding="utf-8"?> +<jnlp spec="1.0" href="UnmatchingSignedJnlpExtension.jnlp" codebase="."> + <information> + <title>UnmatchingSignedJnlpExtension</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>UnmatchingSignedJnlpExtension</description> + <offline/> + </information> + + <security> + <all-permissions/> + </security> + + <resources> + <j2se version="1.6+"/> + <jar href="SignedJnlpResource.jar" main="true"/> + </resources> + + <component-desc /> +</jnlp> diff --git a/tests/reproducers/signed/SignedJnlpResource/srcs/JNLP-INF/APPLICATION_TEMPLATE.jnlp b/tests/reproducers/signed/SignedJnlpResource/srcs/JNLP-INF/APPLICATION_TEMPLATE.jnlp new file mode 100644 index 0000000..1fddaed --- /dev/null +++ b/tests/reproducers/signed/SignedJnlpResource/srcs/JNLP-INF/APPLICATION_TEMPLATE.jnlp @@ -0,0 +1,58 @@ +<!-- + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. + + --> +<?xml version="1.0" encoding="utf-8"?> +<jnlp spec="1.0" href="*" codebase="*"> + <information> + <title>MATCHES SIGNED JNLP</title> + <vendor>*</vendor> + <homepage href="MATCHES_SIGNED_JNLP"/> + <description>MATCHES SIGNED JNLP</description> + <offline/> + </information> + + <security> + <all-permissions/> + </security> + + <resources> + <j2se version="1.6+"/> + <jar href="*" main="*"/> + </resources> + + <component-desc /> +</jnlp> diff --git a/tests/reproducers/signed/SignedJnlpResource/srcs/SignedJnlpResource.java b/tests/reproducers/signed/SignedJnlpResource/srcs/SignedJnlpResource.java new file mode 100644 index 0000000..636a8f7 --- /dev/null +++ b/tests/reproducers/signed/SignedJnlpResource/srcs/SignedJnlpResource.java @@ -0,0 +1,43 @@ +/* SignedJnlpResource..java +Copyright (C) 2012 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License as published by +the Free Software Foundation, version 2. + +IcedTea is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. + */ + +public class SignedJnlpResource { + + public static void main(String[] args){ + System.out.println("Running SignedJnlpResource..."); + } +} |