Mercurial > hg > release > icedtea-web-1.6
changeset 1243:19de1aaabc51
Enabled and properly tested Entry-Point attribute check
line wrap: on
line diff
--- a/ChangeLog Wed Jul 22 13:17:39 2015 +0200 +++ b/ChangeLog Wed Jul 29 16:29:43 2015 +0200 @@ -1,3 +1,80 @@ +2015-07-23 Jiri Vanek <jvanek@redhat.com> + + Enabled and properly tested Entry-Point attribute check + * NEWS: mentioned enabling + * netx/net/sourceforge/jnlp/runtime/ManifestAttributesChecker.java: enabled + call to checkEntryPoint if enabled + * tests/reproducers/signed/EntryPointSignedSingleBothInvalid/resources/EntryPointSignedSingleBothInvalid.java: + * tests/reproducers/signed/EntryPointSignedSingleBothInvalid/resources/EntryPointSignedSingleBothInvalid.java: + * tests/reproducers/signed/EntryPointSignedSingleBothInvalid/resources/EntryPointSignedSingleBothInvalid_applet.java: + * tests/reproducers/signed/EntryPointSignedSingleBothInvalid/resources/EntryPointSignedSingleBothInvalid_applet_security.java: + * tests/reproducers/signed/EntryPointSignedSingleBothInvalid/resources/EntryPointSignedSingleBothInvalid_security.java: + * tests/reproducers/signed/EntryPointSignedSingleBothInvalid/srcs/EntryPointSignedSingleBothInvalid.java: + * tests/reproducers/signed/EntryPointSignedSingleBothInvalid/srcs/META-INF/MANIFEST.java: + * tests/reproducers/signed/EntryPointSignedSingleBothInvalid/testcases/EntryPointSignedSingleBothInvalidTest.java: + tests for Entry-Point with two values, both invalid + * tests/reproducers/signed/EntryPointSignedSingleBothOk/resources/EntryPointSignedSingleBothOk1.java: + * tests/reproducers/signed/EntryPointSignedSingleBothOk/resources/EntryPointSignedSingleBothOk1.java: + * tests/reproducers/signed/EntryPointSignedSingleBothOk/resources/EntryPointSignedSingleBothOk2.java: + * tests/reproducers/signed/EntryPointSignedSingleBothOk/resources/EntryPointSignedSingleBothOk2.java: + * tests/reproducers/signed/EntryPointSignedSingleBothOk/resources/EntryPointSignedSingleBothOk_applet1.java: + * tests/reproducers/signed/EntryPointSignedSingleBothOk/resources/EntryPointSignedSingleBothOk_applet2.java: + * tests/reproducers/signed/EntryPointSignedSingleBothOk/resources/EntryPointSignedSingleBothOk_applet_security1.java: + * tests/reproducers/signed/EntryPointSignedSingleBothOk/resources/EntryPointSignedSingleBothOk_applet_security2.java: + * tests/reproducers/signed/EntryPointSignedSingleBothOk/resources/EntryPointSignedSingleBothOk_security1.java: + * tests/reproducers/signed/EntryPointSignedSingleBothOk/resources/EntryPointSignedSingleBothOk_security2.java: + * tests/reproducers/signed/EntryPointSignedSingleBothOk/srcs/EntryPointSignedSingleBothOk1.java: + * tests/reproducers/signed/EntryPointSignedSingleBothOk/srcs/EntryPointSignedSingleBothOk2.java: + * tests/reproducers/signed/EntryPointSignedSingleBothOk/srcs/META-INF/MANIFEST.java: + * tests/reproducers/signed/EntryPointSignedSingleBothOk/testcases/EntryPointSignedSingleBothOkTest1.java: + * tests/reproducers/signed/EntryPointSignedSingleBothOk/testcases/EntryPointSignedSingleBothOkTest2.java: + tests for Entry-Point with two values, both valid + * tests/reproducers/signed/EntryPointSignedSingleFirstInvalidSecondOk/resources/EntryPointSignedSingleFirstInvalidSecondOk.java: + * tests/reproducers/signed/EntryPointSignedSingleFirstInvalidSecondOk/resources/EntryPointSignedSingleFirstInvalidSecondOk.java: + * tests/reproducers/signed/EntryPointSignedSingleFirstInvalidSecondOk/resources/EntryPointSignedSingleFirstInvalidSecondOk_applet.java: + * tests/reproducers/signed/EntryPointSignedSingleFirstInvalidSecondOk/resources/EntryPointSignedSingleFirstInvalidSecondOk_applet_security.java: + * tests/reproducers/signed/EntryPointSignedSingleFirstInvalidSecondOk/resources/EntryPointSignedSingleFirstInvalidSecondOk_security.java: + * tests/reproducers/signed/EntryPointSignedSingleFirstInvalidSecondOk/srcs/EntryPointSignedSingleFirstInvalidSecondOk.java: + * tests/reproducers/signed/EntryPointSignedSingleFirstInvalidSecondOk/srcs/META-INF/MANIFEST.java: + * tests/reproducers/signed/EntryPointSignedSingleFirstInvalidSecondOk/testcases/EntryPointSignedSingleFirstInvalidSecondOkTest.java: + tests for Entry-Point with two values, first invalid, second ok + * tests/reproducers/signed/EntryPointSignedSingleInvalid/resources/EntryPointSignedSingleInvalid.java: + * tests/reproducers/signed/EntryPointSignedSingleInvalid/resources/EntryPointSignedSingleInvalid.java: + * tests/reproducers/signed/EntryPointSignedSingleInvalid/resources/EntryPointSignedSingleInvalid_applet.java: + * tests/reproducers/signed/EntryPointSignedSingleInvalid/resources/EntryPointSignedSingleInvalid_applet_security.java: + * tests/reproducers/signed/EntryPointSignedSingleInvalid/resources/EntryPointSignedSingleInvalid_security.java: + * tests/reproducers/signed/EntryPointSignedSingleInvalid/srcs/EntryPointSignedSingleInvalid.java: + * tests/reproducers/signed/EntryPointSignedSingleInvalid/srcs/META-INF/MANIFEST.java: + * tests/reproducers/signed/EntryPointSignedSingleInvalid/testcases/EntryPointSignedSingleInvalidTest.java: + tests for Entry-Point with one invalid value + * tests/reproducers/signed/EntryPointSignedSingleOk/resources/EntryPointSignedSingleOk.java: + * tests/reproducers/signed/EntryPointSignedSingleOk/resources/EntryPointSignedSingleOk.java: + * tests/reproducers/signed/EntryPointSignedSingleOk/resources/EntryPointSignedSingleOk_applet.java: + * tests/reproducers/signed/EntryPointSignedSingleOk/resources/EntryPointSignedSingleOk_applet_security.java: + * tests/reproducers/signed/EntryPointSignedSingleOk/resources/EntryPointSignedSingleOk_security.java: + * tests/reproducers/signed/EntryPointSignedSingleOk/srcs/EntryPointSignedSingleOk.java: + * tests/reproducers/signed/EntryPointSignedSingleOk/srcs/META-INF/MANIFEST.java: + * tests/reproducers/signed/EntryPointSignedSingleOk/testcases/EntryPointSignedSingleOkTest.java: + tests for Entry-Point with one ok vlaue + * tests/reproducers/signed/EntryPointSignedSingleSecondInvalidFirstOk/resources/EntryPointSignedSingleSecondInvalidFirstOk.java: + * tests/reproducers/signed/EntryPointSignedSingleSecondInvalidFirstOk/resources/EntryPointSignedSingleSecondInvalidFirstOk.java: + * tests/reproducers/signed/EntryPointSignedSingleSecondInvalidFirstOk/resources/EntryPointSignedSingleSecondInvalidFirstOk_applet.java: + * tests/reproducers/signed/EntryPointSignedSingleSecondInvalidFirstOk/resources/EntryPointSignedSingleSecondInvalidFirstOk_applet_security.java: + * tests/reproducers/signed/EntryPointSignedSingleSecondInvalidFirstOk/resources/EntryPointSignedSingleSecondInvalidFirstOk_security.java: + * tests/reproducers/signed/EntryPointSignedSingleSecondInvalidFirstOk/srcs/EntryPointSignedSingleSecondInvalidFirstOk.java: + * tests/reproducers/signed/EntryPointSignedSingleSecondInvalidFirstOk/srcs/META-INF/MANIFEST.java: + * tests/reproducers/signed/EntryPointSignedSingleSecondInvalidFirstOk/testcases/EntryPointSignedSingleSecondInvalidFirstOkTest.java: + tests for Entry-Point with two values, first ok, second invalid + * tests/reproducers/simple/EntryPointUnsignedSingleInvalid/resources/EntryPointUnsignedSingleInvalid.java: + * tests/reproducers/simple/EntryPointUnsignedSingleInvalid/resources/EntryPointUnsignedSingleInvalid.java: + * tests/reproducers/simple/EntryPointUnsignedSingleInvalid/resources/EntryPointUnsignedSingleInvalid_applet.java: + * tests/reproducers/simple/EntryPointUnsignedSingleInvalid/resources/EntryPointUnsignedSingleInvalid_applet_security.java: + * tests/reproducers/simple/EntryPointUnsignedSingleInvalid/resources/EntryPointUnsignedSingleInvalid_security.java: + * tests/reproducers/simple/EntryPointUnsignedSingleInvalid/srcs/EntryPointUnsignedSingleInvalid.java: + * tests/reproducers/simple/EntryPointUnsignedSingleInvalid/srcs/META-INF/MANIFEST.java: + * tests/reproducers/simple/EntryPointUnsignedSingleInvalid/testcases/EntryPointUnsignedSingleInvalidTest.java: + tests for Entry-Point with one invalid value in unsigned jar (ignoring this value) + 2015-07-22 Fridrich Strba <fridrich.strba@suse.com> * Makefile.am: (generate-docs.stamp) added '-' to tail of tail command as
--- a/NEWS Wed Jul 22 13:17:39 2015 +0200 +++ b/NEWS Wed Jul 29 16:29:43 2015 +0200 @@ -9,6 +9,7 @@ CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY New in release 1.6.1 (2015-MM-DD): +* Enabled Entry-Point attribute check * permissions sandbox and signed app and unsigned app with permissions all-permissions now run in sandbox instead of not at all. * fixed DownloadService * fixed bug in caching of files with query
--- a/netx/net/sourceforge/jnlp/runtime/ManifestAttributesChecker.java Wed Jul 22 13:17:39 2015 +0200 +++ b/netx/net/sourceforge/jnlp/runtime/ManifestAttributesChecker.java Wed Jul 29 16:29:43 2015 +0200 @@ -122,6 +122,13 @@ } else { OutputController.getLogger().log(OutputController.Level.WARNING_ALL, R("MACCheckSkipped", "Application Library Allowable Codebase", "ALAC")); } + + if (attributesCheck.contains(MANIFEST_ATTRIBUTES_CHECK.ENTRYPOINT) + || attributesCheck.contains(MANIFEST_ATTRIBUTES_CHECK.ALL)) { + checkEntryPoint(); + } else { + OutputController.getLogger().log(OutputController.Level.WARNING_ALL, R("MACCheckSkipped", "Entry-Point", "ENTRYPOINT")); + } } }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleBothInvalid/resources/EntryPointSignedSingleBothInvalid.html Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,42 @@ +<!-- + +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. + + --> +<html><head></head><body bgcolor="red"> +<p><applet code="EntryPointSignedSingleBothInvalid.class" archive="EntryPointSignedSingleBothInvalid.jar" codebase="." width="250" height="200"> +</applet></p> +</body> +</html> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleBothInvalid/resources/EntryPointSignedSingleBothInvalid.jnlp Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,53 @@ +<!-- + +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="EntryPointSignedSingleBothInvalid.jnlp" codebase="."> + <information> + <title>EntryPointSignedSingleBothInvalid</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>EntryPointSignedSingleBothInvalid</description> + <offline/> + </information> + <resources> + <j2se version="1.4+"/> + <jar href="EntryPointSignedSingleBothInvalid.jar"/> + </resources> + <application-desc main-class="EntryPointSignedSingleBothInvalid"> + </application-desc> +</jnlp> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleBothInvalid/resources/EntryPointSignedSingleBothInvalid_applet.jnlp Wed Jul 29 16:29:43 2015 +0200 @@ -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="EntryPointSignedSingleBothInvalid_applet.jnlp" codebase="."> + <information> + <title>EntryPointSignedSingleBothInvalid</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>EntryPointSignedSingleBothInvalid</description> + <offline/> + </information> + <resources> + <j2se version="1.4+"/> + <jar href="EntryPointSignedSingleBothInvalid.jar"/> + </resources> + <applet-desc + documentBase="." + name="EntryPointSignedSingleBothInvalid" + main-class="EntryPointSignedSingleBothInvalid" + width="250" + height="200"> + </applet-desc> +</jnlp> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleBothInvalid/resources/EntryPointSignedSingleBothInvalid_applet_security.jnlp Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,61 @@ +<!-- + +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="EntryPointSignedSingleBothInvalid_applet_security.jnlp" codebase="."> + <information> + <title>EntryPointSignedSingleBothInvalid</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>EntryPointSignedSingleBothInvalid</description> + <offline/> + </information> + <resources> + <j2se version="1.4+"/> + <jar href="EntryPointSignedSingleBothInvalid.jar"/> + </resources> + <security> + <all-permissions/> + </security> + <applet-desc + documentBase="." + name="EntryPointSignedSingleBothInvalid" + main-class="EntryPointSignedSingleBothInvalid" + width="250" + height="200"> + </applet-desc> +</jnlp> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleBothInvalid/resources/EntryPointSignedSingleBothInvalid_security.jnlp Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,56 @@ +<!-- + +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="EntryPointSignedSingleBothInvalid_security.jnlp" codebase="."> + <information> + <title>EntryPointSignedSingleBothInvalid</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>EntryPointSignedSingleBothInvalid</description> + <offline/> + </information> + <resources> + <j2se version="1.4+"/> + <jar href="EntryPointSignedSingleBothInvalid.jar"/> + </resources> + <security> + <all-permissions/> + </security> + <application-desc main-class="EntryPointSignedSingleBothInvalid"> + </application-desc> +</jnlp> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleBothInvalid/srcs/EntryPointSignedSingleBothInvalid.java Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,57 @@ + +import java.applet.Applet; + +/* AppletTest.java + Copyright (C) 2011 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 EntryPointSignedSingleBothInvalid extends Applet { + + @Override + public void init() { + confirm(); + } + + public static void main(String... s) { + confirm(); + } + + private static void confirm() { + System.out.println("*** applet running ***"); + System.out.println(System.getProperty("user.home")); + System.out.println("*** APPLET FINISHED ***"); + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleBothInvalid/srcs/META-INF/MANIFEST.MF Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Entry-Point: SomeDifferentMainClass AnotherDifferentMainClass +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleBothInvalid/testcases/EntryPointSignedSingleBothInvalidTest.java Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,125 @@ + +import java.io.IOException; +import java.util.Arrays; +import net.sourceforge.jnlp.OptionsDefinitions; +import net.sourceforge.jnlp.ProcessResult; +import net.sourceforge.jnlp.ServerAccess; +import net.sourceforge.jnlp.annotations.TestInBrowsers; +import net.sourceforge.jnlp.browsertesting.BrowserTest; +import static net.sourceforge.jnlp.browsertesting.BrowserTest.server; +import net.sourceforge.jnlp.browsertesting.Browsers; +import net.sourceforge.jnlp.closinglisteners.AutoErrorClosingListener; +import net.sourceforge.jnlp.closinglisteners.AutoOkClosingListener; +import net.sourceforge.jnlp.closinglisteners.StringBasedClosingListener; +import net.sourceforge.jnlp.config.DeploymentConfiguration; +import net.sourceforge.jnlp.runtime.ManifestAttributesChecker; +import net.sourceforge.jnlp.tools.DeploymentPropertiesModifier; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.BeforeClass; +import org.junit.Test; + +/* AppletTest.java + Copyright (C) 2011 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 EntryPointSignedSingleBothInvalidTest extends BrowserTest { + + private static final DeploymentPropertiesModifier dpm = new DeploymentPropertiesModifier(); + private static final StringBasedClosingListener aok = new AutoOkClosingListener(); + private static final StringBasedClosingListener aer = new AutoErrorClosingListener(); + private static final String confirmation = "*** applet running ***"; + + @BeforeClass + public static void setDeploymentManifestPermissionReadingOnly() throws IOException { + dpm.setProperties(DeploymentConfiguration.KEY_ENABLE_MANIFEST_ATTRIBUTES_CHECK, ManifestAttributesChecker.MANIFEST_ATTRIBUTES_CHECK.ENTRYPOINT.toString()); + } + + @AfterClass + public static void restoreDeploymentProeprtiees() throws IOException { + dpm.restoreProperties(); + } + + @Test + public void javawsAllPermNoSecurity() throws Exception { + ProcessResult p = server.executeJavawsHeadless("EntryPointSignedSingleBothInvalid.jnlp"); + Assert.assertFalse(p.stdout.contains(confirmation)); + Assert.assertFalse(p.stdout.contains(aok.getCondition())); + Assert.assertTrue(p.stderr.contains(aer.getCondition())); + } + + @Test + public void javawsAllPermAllSecurity() throws Exception { + ProcessResult p = server.executeJavawsHeadless("EntryPointSignedSingleBothInvalid_security.jnlp"); + Assert.assertFalse(p.stdout.contains(confirmation)); + Assert.assertFalse(p.stdout.contains(aok.getCondition())); + Assert.assertTrue(p.stderr.contains(aer.getCondition())); + } + + @Test + public void javawsAppletAllPermNoSecurity() throws Exception { + ProcessResult p = server.executeJavaws(Arrays.asList(new String[]{"-headless", "-verbose"}), "EntryPointSignedSingleBothInvalid_applet.jnlp", new AutoOkClosingListener(), new AutoErrorClosingListener()); + Assert.assertFalse(p.stdout.contains(confirmation)); + Assert.assertFalse(p.stdout.contains(aok.getCondition())); + Assert.assertTrue(p.stderr.contains(aer.getCondition())); + } + + @Test + public void javawsAppletAllPermAllSecurity() throws Exception { + ProcessResult p = server.executeJavawsHeadless("EntryPointSignedSingleBothInvalid_applet_security.jnlp", new AutoOkClosingListener(), new AutoErrorClosingListener()); + Assert.assertFalse(p.stdout.contains(confirmation)); + Assert.assertFalse(p.stdout.contains(aok.getCondition())); + Assert.assertTrue(p.stderr.contains(aer.getCondition())); + } + + @Test + @TestInBrowsers(testIn = Browsers.one) + public void appletAllPermAllSecurity() throws Exception { + server.getBrowserLocation(); + ProcessResult p = server.executeBrowser("EntryPointSignedSingleBothInvalid.html", ServerAccess.AutoClose.CLOSE_ON_BOTH); + Assert.assertFalse(p.stdout.contains(confirmation)); + Assert.assertFalse(p.stdout.contains(aok.getCondition())); + Assert.assertTrue(p.stderr.contains(aer.getCondition())); + } + + @Test + public void javawsHtml() throws Exception { + ProcessResult p = server.executeJavaws(Arrays.asList(new String[]{OptionsDefinitions.OPTIONS.HTML.option}), "EntryPointSignedSingleBothInvalid.html", new AutoOkClosingListener(), new AutoErrorClosingListener()); + Assert.assertFalse(p.stdout.contains(confirmation)); + Assert.assertFalse(p.stdout.contains(aok.getCondition())); + Assert.assertTrue(p.stderr.contains(aer.getCondition())); + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleBothOk/resources/EntryPointSignedSingleBothOk1.html Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,42 @@ +<!-- + +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. + + --> +<html><head></head><body bgcolor="red"> +<p><applet code="EntryPointSignedSingleBothOk1.class" archive="EntryPointSignedSingleBothOk.jar" codebase="." width="250" height="200"> +</applet></p> +</body> +</html> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleBothOk/resources/EntryPointSignedSingleBothOk1.jnlp Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,53 @@ +<!-- + +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="EntryPointSignedSingleBothOk1.jnlp" codebase="."> + <information> + <title>EntryPointSignedSingleBothOk</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>EntryPointSignedSingleBothOk</description> + <offline/> + </information> + <resources> + <j2se version="1.4+"/> + <jar href="EntryPointSignedSingleBothOk.jar"/> + </resources> + <application-desc main-class="EntryPointSignedSingleBothOk1"> + </application-desc> +</jnlp> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleBothOk/resources/EntryPointSignedSingleBothOk2.html Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,42 @@ +<!-- + +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. + + --> +<html><head></head><body bgcolor="red"> +<p><applet code="EntryPointSignedSingleBothOk2.class" archive="EntryPointSignedSingleBothOk.jar" codebase="." width="250" height="200"> +</applet></p> +</body> +</html> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleBothOk/resources/EntryPointSignedSingleBothOk2.jnlp Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,53 @@ +<!-- + +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="EntryPointSignedSingleBothOk2.jnlp" codebase="."> + <information> + <title>EntryPointSignedSingleBothOk</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>EntryPointSignedSingleBothOk</description> + <offline/> + </information> + <resources> + <j2se version="1.4+"/> + <jar href="EntryPointSignedSingleBothOk.jar"/> + </resources> + <application-desc main-class="EntryPointSignedSingleBothOk2"> + </application-desc> +</jnlp> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleBothOk/resources/EntryPointSignedSingleBothOk_applet1.jnlp Wed Jul 29 16:29:43 2015 +0200 @@ -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="EntryPointSignedSingleBothOk_applet1.jnlp" codebase="."> + <information> + <title>EntryPointSignedSingleBothOk</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>EntryPointSignedSingleBothOk</description> + <offline/> + </information> + <resources> + <j2se version="1.4+"/> + <jar href="EntryPointSignedSingleBothOk.jar"/> + </resources> + <applet-desc + documentBase="." + name="EntryPointSignedSingleBothOk" + main-class="EntryPointSignedSingleBothOk1" + width="250" + height="200"> + </applet-desc> +</jnlp> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleBothOk/resources/EntryPointSignedSingleBothOk_applet2.jnlp Wed Jul 29 16:29:43 2015 +0200 @@ -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="EntryPointSignedSingleBothOk_applet2.jnlp" codebase="."> + <information> + <title>EntryPointSignedSingleBothOk</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>EntryPointSignedSingleBothOk</description> + <offline/> + </information> + <resources> + <j2se version="1.4+"/> + <jar href="EntryPointSignedSingleBothOk.jar"/> + </resources> + <applet-desc + documentBase="." + name="EntryPointSignedSingleBothOk" + main-class="EntryPointSignedSingleBothOk2" + width="250" + height="200"> + </applet-desc> +</jnlp> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleBothOk/resources/EntryPointSignedSingleBothOk_applet_security1.jnlp Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,61 @@ +<!-- + +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="EntryPointSignedSingleBothOk_applet_security1.jnlp" codebase="."> + <information> + <title>EntryPointSignedSingleBothOk</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>EntryPointSignedSingleBothOk</description> + <offline/> + </information> + <resources> + <j2se version="1.4+"/> + <jar href="EntryPointSignedSingleBothOk.jar"/> + </resources> + <security> + <all-permissions/> + </security> + <applet-desc + documentBase="." + name="EntryPointSignedSingleBothOk" + main-class="EntryPointSignedSingleBothOk1" + width="250" + height="200"> + </applet-desc> +</jnlp> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleBothOk/resources/EntryPointSignedSingleBothOk_applet_security2.jnlp Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,61 @@ +<!-- + +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="EntryPointSignedSingleBothOk_applet_security2.jnlp" codebase="."> + <information> + <title>EntryPointSignedSingleBothOk</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>EntryPointSignedSingleBothOk</description> + <offline/> + </information> + <resources> + <j2se version="1.4+"/> + <jar href="EntryPointSignedSingleBothOk.jar"/> + </resources> + <security> + <all-permissions/> + </security> + <applet-desc + documentBase="." + name="EntryPointSignedSingleBothOk" + main-class="EntryPointSignedSingleBothOk2" + width="250" + height="200"> + </applet-desc> +</jnlp> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleBothOk/resources/EntryPointSignedSingleBothOk_security1.jnlp Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,56 @@ +<!-- + +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="EntryPointSignedSingleBothOk_security1.jnlp" codebase="."> + <information> + <title>EntryPointSignedSingleBothOk</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>EntryPointSignedSingleBothOk</description> + <offline/> + </information> + <resources> + <j2se version="1.4+"/> + <jar href="EntryPointSignedSingleBothOk.jar"/> + </resources> + <security> + <all-permissions/> + </security> + <application-desc main-class="EntryPointSignedSingleBothOk1"> + </application-desc> +</jnlp> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleBothOk/resources/EntryPointSignedSingleBothOk_security2.jnlp Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,56 @@ +<!-- + +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="EntryPointSignedSingleBothOk_security2.jnlp" codebase="."> + <information> + <title>EntryPointSignedSingleBothOk</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>EntryPointSignedSingleBothOk</description> + <offline/> + </information> + <resources> + <j2se version="1.4+"/> + <jar href="EntryPointSignedSingleBothOk.jar"/> + </resources> + <security> + <all-permissions/> + </security> + <application-desc main-class="EntryPointSignedSingleBothOk2"> + </application-desc> +</jnlp> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleBothOk/srcs/EntryPointSignedSingleBothOk1.java Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,58 @@ + +import java.applet.Applet; + +/* AppletTest.java + Copyright (C) 2011 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 EntryPointSignedSingleBothOk1 extends Applet { + + @Override + public void init() { + confirm(); + } + + public static void main(String... s) { + confirm(); + } + + private static void confirm() { + System.out.println("*** applet1 running ***"); + System.out.println(System.getProperty("user.home")); + System.out.println("*** APPLET1 FINISHED ***"); + System.out.println("*** APPLET FINISHED ***"); + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleBothOk/srcs/EntryPointSignedSingleBothOk2.java Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,58 @@ + +import java.applet.Applet; + +/* AppletTest.java + Copyright (C) 2011 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 EntryPointSignedSingleBothOk2 extends Applet { + + @Override + public void init() { + confirm(); + } + + public static void main(String... s) { + confirm(); + } + + private static void confirm() { + System.out.println("*** applet2 running ***"); + System.out.println(System.getProperty("user.home")); + System.out.println("*** APPLET2 FINISHED ***"); + System.out.println("*** APPLET FINISHED ***"); + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleBothOk/srcs/META-INF/MANIFEST.MF Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Entry-Point: EntryPointSignedSingleBothOk2 EntryPointSignedSingleBothOk1 +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleBothOk/testcases/EntryPointSignedSingleBothOkTest1.java Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,163 @@ +/* + Copyright (C) 2015 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.io.IOException; +import java.util.Arrays; +import net.sourceforge.jnlp.OptionsDefinitions; +import net.sourceforge.jnlp.ProcessResult; +import net.sourceforge.jnlp.ServerAccess; +import net.sourceforge.jnlp.annotations.TestInBrowsers; +import net.sourceforge.jnlp.browsertesting.BrowserTest; +import static net.sourceforge.jnlp.browsertesting.BrowserTest.server; +import net.sourceforge.jnlp.browsertesting.Browsers; +import net.sourceforge.jnlp.closinglisteners.AutoErrorClosingListener; +import net.sourceforge.jnlp.closinglisteners.AutoOkClosingListener; +import net.sourceforge.jnlp.closinglisteners.StringBasedClosingListener; +import net.sourceforge.jnlp.config.DeploymentConfiguration; +import net.sourceforge.jnlp.runtime.ManifestAttributesChecker; +import net.sourceforge.jnlp.tools.DeploymentPropertiesModifier; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.BeforeClass; +import org.junit.Test; + + +public class EntryPointSignedSingleBothOkTest1 extends BrowserTest { + + + public static final String MAGICAL_OK1_CLOSING_STRING = "*** APPLET1 FINISHED ***"; + public static final String MAGICAL_OK2_CLOSING_STRING = "*** APPLET2 FINISHED ***"; + +private static class AutoOk1ClosingListener extends StringBasedClosingListener { + + public AutoOk1ClosingListener() { + super(MAGICAL_OK1_CLOSING_STRING); + } + +} + +private static class AutoOk2ClosingListener extends StringBasedClosingListener { + + public AutoOk2ClosingListener() { + super(MAGICAL_OK2_CLOSING_STRING); + } + +} + + private static final DeploymentPropertiesModifier dpm = new DeploymentPropertiesModifier(); + private static final StringBasedClosingListener aok = new AutoOkClosingListener(); + + private static final StringBasedClosingListener aok1 = new AutoOk1ClosingListener(); + private static final StringBasedClosingListener aok2 = new AutoOk2ClosingListener(); + + private static final StringBasedClosingListener aer = new AutoErrorClosingListener(); + private static final String confirmation1 = "*** applet1 running ***"; + private static final String confirmation2 = "*** applet2 running ***"; + + + @BeforeClass + public static void setDeploymentManifestPermissionReadingOnly() throws IOException { + dpm.setProperties(DeploymentConfiguration.KEY_ENABLE_MANIFEST_ATTRIBUTES_CHECK, ManifestAttributesChecker.MANIFEST_ATTRIBUTES_CHECK.ENTRYPOINT.toString()); + } + + @AfterClass + public static void restoreDeploymentProeprtiees() throws IOException { + dpm.restoreProperties(); + } + + @Test + public void javawsAllPermNoSecurity1() throws Exception { + ProcessResult p = server.executeJavawsHeadless("EntryPointSignedSingleBothOk1.jnlp"); + Assert.assertTrue(p.stdout.contains(confirmation1)); + Assert.assertFalse(p.stdout.contains(aok1.getCondition())); + Assert.assertTrue(p.stderr.contains(aer.getCondition())); + assertNope(p); + } + + @Test + public void javawsAllPermAllSecurity1() throws Exception { + ProcessResult p = server.executeJavawsHeadless("EntryPointSignedSingleBothOk_security1.jnlp"); + Assert.assertTrue(p.stdout.contains(confirmation1)); + Assert.assertTrue(p.stdout.contains(aok1.getCondition())); + Assert.assertFalse(p.stderr.contains(aer.getCondition())); + assertNope(p); + } + + @Test + public void javawsAppletAllPermNoSecurity1() throws Exception { + ProcessResult p = server.executeJavaws(Arrays.asList(new String[]{"-headless", "-verbose"}), "EntryPointSignedSingleBothOk_applet1.jnlp", new AutoOkClosingListener(), new AutoErrorClosingListener()); + Assert.assertTrue(p.stdout.contains(confirmation1)); + Assert.assertFalse(p.stdout.contains(aok1.getCondition())); + Assert.assertTrue(p.stderr.contains(aer.getCondition())); + assertNope(p); + } + + @Test + public void javawsAppletAllPermAllSecurity1() throws Exception { + ProcessResult p = server.executeJavawsHeadless("EntryPointSignedSingleBothOk_applet_security1.jnlp", new AutoOkClosingListener(), new AutoErrorClosingListener()); + Assert.assertTrue(p.stdout.contains(confirmation1)); + Assert.assertTrue(p.stdout.contains(aok1.getCondition())); + Assert.assertFalse(p.stderr.contains(aer.getCondition())); + assertNope(p); + } + + @Test + @TestInBrowsers(testIn = Browsers.one) + public void appletAllPermAllSecurity1() throws Exception { + server.getBrowserLocation(); + ProcessResult p = server.executeBrowser("EntryPointSignedSingleBothOk1.html", ServerAccess.AutoClose.CLOSE_ON_BOTH); + Assert.assertTrue(p.stdout.contains(confirmation1)); + Assert.assertTrue(p.stdout.contains(aok1.getCondition())); + Assert.assertFalse(p.stderr.contains(aer.getCondition())); + assertNope(p); + } + + @Test + public void javawsHtml1() throws Exception { + ProcessResult p = server.executeJavaws(Arrays.asList(new String[]{OptionsDefinitions.OPTIONS.HTML.option}), "EntryPointSignedSingleBothOk1.html", new AutoOkClosingListener(), new AutoErrorClosingListener()); + Assert.assertTrue(p.stdout.contains(confirmation1)); + Assert.assertTrue(p.stdout.contains(aok1.getCondition())); + Assert.assertFalse(p.stderr.contains(aer.getCondition())); + assertNope(p); + } + + public void assertNope(ProcessResult p){ + Assert.assertFalse(p.stdout.contains(confirmation2)); + Assert.assertFalse(p.stdout.contains(aok2.getCondition())); + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleBothOk/testcases/EntryPointSignedSingleBothOkTest2.java Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,161 @@ +/* + Copyright (C) 2015 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.io.IOException; +import java.util.Arrays; +import net.sourceforge.jnlp.OptionsDefinitions; +import net.sourceforge.jnlp.ProcessResult; +import net.sourceforge.jnlp.ServerAccess; +import net.sourceforge.jnlp.annotations.TestInBrowsers; +import net.sourceforge.jnlp.browsertesting.BrowserTest; +import static net.sourceforge.jnlp.browsertesting.BrowserTest.server; +import net.sourceforge.jnlp.browsertesting.Browsers; +import net.sourceforge.jnlp.closinglisteners.AutoErrorClosingListener; +import net.sourceforge.jnlp.closinglisteners.AutoOkClosingListener; +import net.sourceforge.jnlp.closinglisteners.StringBasedClosingListener; +import net.sourceforge.jnlp.config.DeploymentConfiguration; +import net.sourceforge.jnlp.runtime.ManifestAttributesChecker; +import net.sourceforge.jnlp.tools.DeploymentPropertiesModifier; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.BeforeClass; +import org.junit.Test; + +public class EntryPointSignedSingleBothOkTest2 extends BrowserTest { + + + public static final String MAGICAL_OK1_CLOSING_STRING = "*** APPLET1 FINISHED ***"; + public static final String MAGICAL_OK2_CLOSING_STRING = "*** APPLET2 FINISHED ***"; + +private static class AutoOk1ClosingListener extends StringBasedClosingListener { + + public AutoOk1ClosingListener() { + super(MAGICAL_OK1_CLOSING_STRING); + } + +} + +private static class AutoOk2ClosingListener extends StringBasedClosingListener { + + public AutoOk2ClosingListener() { + super(MAGICAL_OK2_CLOSING_STRING); + } + +} + + private static final DeploymentPropertiesModifier dpm = new DeploymentPropertiesModifier(); + private static final StringBasedClosingListener aok = new AutoOkClosingListener(); + + private static final StringBasedClosingListener aok1 = new AutoOk1ClosingListener(); + private static final StringBasedClosingListener aok2 = new AutoOk2ClosingListener(); + + private static final StringBasedClosingListener aer = new AutoErrorClosingListener(); + private static final String confirmation1 = "*** applet1 running ***"; + private static final String confirmation2 = "*** applet2 running ***"; + + + @BeforeClass + public static void setDeploymentManifestPermissionReadingOnly() throws IOException { + dpm.setProperties(DeploymentConfiguration.KEY_ENABLE_MANIFEST_ATTRIBUTES_CHECK, ManifestAttributesChecker.MANIFEST_ATTRIBUTES_CHECK.ENTRYPOINT.toString()); + } + + @AfterClass + public static void restoreDeploymentProeprtiees() throws IOException { + dpm.restoreProperties(); + } + + @Test + public void javawsAllPermNoSecurity2() throws Exception { + ProcessResult p = server.executeJavawsHeadless("EntryPointSignedSingleBothOk2.jnlp"); + Assert.assertTrue(p.stdout.contains(confirmation2)); + Assert.assertFalse(p.stdout.contains(aok2.getCondition())); + Assert.assertTrue(p.stderr.contains(aer.getCondition())); + assertNope(p); + } + + @Test + public void javawsAllPermAllSecurity2() throws Exception { + ProcessResult p = server.executeJavawsHeadless("EntryPointSignedSingleBothOk_security2.jnlp"); + Assert.assertTrue(p.stdout.contains(confirmation2)); + Assert.assertTrue(p.stdout.contains(aok2.getCondition())); + Assert.assertFalse(p.stderr.contains(aer.getCondition())); + } + + @Test + public void javawsAppletAllPermNoSecurity2() throws Exception { + ProcessResult p = server.executeJavaws(Arrays.asList(new String[]{"-headless", "-verbose"}), "EntryPointSignedSingleBothOk_applet2.jnlp", new AutoOkClosingListener(), new AutoErrorClosingListener()); + Assert.assertTrue(p.stdout.contains(confirmation2)); + Assert.assertFalse(p.stdout.contains(aok2.getCondition())); + Assert.assertTrue(p.stderr.contains(aer.getCondition())); + assertNope(p); + } + + @Test + public void javawsAppletAllPermAllSecurity2() throws Exception { + ProcessResult p = server.executeJavawsHeadless("EntryPointSignedSingleBothOk_applet_security2.jnlp", new AutoOkClosingListener(), new AutoErrorClosingListener()); + Assert.assertTrue(p.stdout.contains(confirmation2)); + Assert.assertTrue(p.stdout.contains(aok2.getCondition())); + Assert.assertFalse(p.stderr.contains(aer.getCondition())); + assertNope(p); + } + + @Test + @TestInBrowsers(testIn = Browsers.one) + public void appletAllPermAllSecurity2() throws Exception { + server.getBrowserLocation(); + ProcessResult p = server.executeBrowser("EntryPointSignedSingleBothOk2.html", ServerAccess.AutoClose.CLOSE_ON_BOTH); + Assert.assertTrue(p.stdout.contains(confirmation2)); + Assert.assertTrue(p.stdout.contains(aok2.getCondition())); + Assert.assertFalse(p.stderr.contains(aer.getCondition())); + assertNope(p); + } + + @Test + public void javawsHtml2() throws Exception { + ProcessResult p = server.executeJavaws(Arrays.asList(new String[]{OptionsDefinitions.OPTIONS.HTML.option}), "EntryPointSignedSingleBothOk2.html", new AutoOkClosingListener(), new AutoErrorClosingListener()); + Assert.assertTrue(p.stdout.contains(confirmation2)); + Assert.assertTrue(p.stdout.contains(aok2.getCondition())); + Assert.assertFalse(p.stderr.contains(aer.getCondition())); + assertNope(p); + } + + public void assertNope(ProcessResult p){ + Assert.assertFalse(p.stdout.contains(confirmation1)); + Assert.assertFalse(p.stdout.contains(aok1.getCondition())); + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleFirstInvalidSecondOk/resources/EntryPointSignedSingleFirstInvalidSecondOk.html Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,42 @@ +<!-- + +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. + + --> +<html><head></head><body bgcolor="red"> +<p><applet code="EntryPointSignedSingleFirstInvalidSecondOk.class" archive="EntryPointSignedSingleFirstInvalidSecondOk.jar" codebase="." width="250" height="200"> +</applet></p> +</body> +</html> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleFirstInvalidSecondOk/resources/EntryPointSignedSingleFirstInvalidSecondOk.jnlp Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,53 @@ +<!-- + +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="EntryPointSignedSingleFirstInvalidSecondOk.jnlp" codebase="."> + <information> + <title>EntryPointSignedSingleFirstInvalidSecondOk</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>EntryPointSignedSingleFirstInvalidSecondOk</description> + <offline/> + </information> + <resources> + <j2se version="1.4+"/> + <jar href="EntryPointSignedSingleFirstInvalidSecondOk.jar"/> + </resources> + <application-desc main-class="EntryPointSignedSingleFirstInvalidSecondOk"> + </application-desc> +</jnlp> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleFirstInvalidSecondOk/resources/EntryPointSignedSingleFirstInvalidSecondOk_applet.jnlp Wed Jul 29 16:29:43 2015 +0200 @@ -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="EntryPointSignedSingleFirstInvalidSecondOk_applet.jnlp" codebase="."> + <information> + <title>EntryPointSignedSingleFirstInvalidSecondOk</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>EntryPointSignedSingleFirstInvalidSecondOk</description> + <offline/> + </information> + <resources> + <j2se version="1.4+"/> + <jar href="EntryPointSignedSingleFirstInvalidSecondOk.jar"/> + </resources> + <applet-desc + documentBase="." + name="EntryPointSignedSingleFirstInvalidSecondOk" + main-class="EntryPointSignedSingleFirstInvalidSecondOk" + width="250" + height="200"> + </applet-desc> +</jnlp> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleFirstInvalidSecondOk/resources/EntryPointSignedSingleFirstInvalidSecondOk_applet_security.jnlp Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,61 @@ +<!-- + +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="EntryPointSignedSingleFirstInvalidSecondOk_applet_security.jnlp" codebase="."> + <information> + <title>EntryPointSignedSingleFirstInvalidSecondOk</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>EntryPointSignedSingleFirstInvalidSecondOk</description> + <offline/> + </information> + <resources> + <j2se version="1.4+"/> + <jar href="EntryPointSignedSingleFirstInvalidSecondOk.jar"/> + </resources> + <security> + <all-permissions/> + </security> + <applet-desc + documentBase="." + name="EntryPointSignedSingleFirstInvalidSecondOk" + main-class="EntryPointSignedSingleFirstInvalidSecondOk" + width="250" + height="200"> + </applet-desc> +</jnlp> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleFirstInvalidSecondOk/resources/EntryPointSignedSingleFirstInvalidSecondOk_security.jnlp Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,56 @@ +<!-- + +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="EntryPointSignedSingleFirstInvalidSecondOk_security.jnlp" codebase="."> + <information> + <title>EntryPointSignedSingleFirstInvalidSecondOk</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>EntryPointSignedSingleFirstInvalidSecondOk</description> + <offline/> + </information> + <resources> + <j2se version="1.4+"/> + <jar href="EntryPointSignedSingleFirstInvalidSecondOk.jar"/> + </resources> + <security> + <all-permissions/> + </security> + <application-desc main-class="EntryPointSignedSingleFirstInvalidSecondOk"> + </application-desc> +</jnlp> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleFirstInvalidSecondOk/srcs/EntryPointSignedSingleFirstInvalidSecondOk.java Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,57 @@ + +import java.applet.Applet; + +/* AppletTest.java + Copyright (C) 2011 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 EntryPointSignedSingleFirstInvalidSecondOk extends Applet { + + @Override + public void init() { + confirm(); + } + + public static void main(String... s) { + confirm(); + } + + private static void confirm() { + System.out.println("*** applet running ***"); + System.out.println(System.getProperty("user.home")); + System.out.println("*** APPLET FINISHED ***"); + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleFirstInvalidSecondOk/srcs/META-INF/MANIFEST.MF Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Entry-Point: SomeDifferentMainClass EntryPointSignedSingleFirstInvalidSecondOk +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleFirstInvalidSecondOk/testcases/EntryPointSignedSingleFirstInvalidSecondOkTest.java Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,125 @@ + +import java.io.IOException; +import java.util.Arrays; +import net.sourceforge.jnlp.OptionsDefinitions; +import net.sourceforge.jnlp.ProcessResult; +import net.sourceforge.jnlp.ServerAccess; +import net.sourceforge.jnlp.annotations.TestInBrowsers; +import net.sourceforge.jnlp.browsertesting.BrowserTest; +import static net.sourceforge.jnlp.browsertesting.BrowserTest.server; +import net.sourceforge.jnlp.browsertesting.Browsers; +import net.sourceforge.jnlp.closinglisteners.AutoErrorClosingListener; +import net.sourceforge.jnlp.closinglisteners.AutoOkClosingListener; +import net.sourceforge.jnlp.closinglisteners.StringBasedClosingListener; +import net.sourceforge.jnlp.config.DeploymentConfiguration; +import net.sourceforge.jnlp.runtime.ManifestAttributesChecker; +import net.sourceforge.jnlp.tools.DeploymentPropertiesModifier; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.BeforeClass; +import org.junit.Test; + +/* AppletTest.java + Copyright (C) 2011 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 EntryPointSignedSingleFirstInvalidSecondOkTest extends BrowserTest { + + private static final DeploymentPropertiesModifier dpm = new DeploymentPropertiesModifier(); + private static final StringBasedClosingListener aok = new AutoOkClosingListener(); + private static final StringBasedClosingListener aer = new AutoErrorClosingListener(); + private static final String confirmation = "*** applet running ***"; + + @BeforeClass + public static void setDeploymentManifestPermissionReadingOnly() throws IOException { + dpm.setProperties(DeploymentConfiguration.KEY_ENABLE_MANIFEST_ATTRIBUTES_CHECK, ManifestAttributesChecker.MANIFEST_ATTRIBUTES_CHECK.ENTRYPOINT.toString()); + } + + @AfterClass + public static void restoreDeploymentProeprtiees() throws IOException { + dpm.restoreProperties(); + } + + @Test + public void javawsAllPermNoSecurity() throws Exception { + ProcessResult p = server.executeJavawsHeadless("EntryPointSignedSingleFirstInvalidSecondOk.jnlp"); + Assert.assertTrue(p.stdout.contains(confirmation)); + Assert.assertFalse(p.stdout.contains(aok.getCondition())); + Assert.assertTrue(p.stderr.contains(aer.getCondition())); + } + + @Test + public void javawsAllPermAllSecurity() throws Exception { + ProcessResult p = server.executeJavawsHeadless("EntryPointSignedSingleFirstInvalidSecondOk_security.jnlp"); + Assert.assertTrue(p.stdout.contains(confirmation)); + Assert.assertTrue(p.stdout.contains(aok.getCondition())); + Assert.assertFalse(p.stderr.contains(aer.getCondition())); + } + + @Test + public void javawsAppletAllPermNoSecurity() throws Exception { + ProcessResult p = server.executeJavaws(Arrays.asList(new String[]{"-headless", "-verbose"}), "EntryPointSignedSingleFirstInvalidSecondOk_applet.jnlp", new AutoOkClosingListener(), new AutoErrorClosingListener()); + Assert.assertTrue(p.stdout.contains(confirmation)); + Assert.assertFalse(p.stdout.contains(aok.getCondition())); + Assert.assertTrue(p.stderr.contains(aer.getCondition())); + } + + @Test + public void javawsAppletAllPermAllSecurity() throws Exception { + ProcessResult p = server.executeJavawsHeadless("EntryPointSignedSingleFirstInvalidSecondOk_applet_security.jnlp", new AutoOkClosingListener(), new AutoErrorClosingListener()); + Assert.assertTrue(p.stdout.contains(confirmation)); + Assert.assertTrue(p.stdout.contains(aok.getCondition())); + Assert.assertFalse(p.stderr.contains(aer.getCondition())); + } + + @Test + @TestInBrowsers(testIn = Browsers.one) + public void appletAllPermAllSecurity() throws Exception { + server.getBrowserLocation(); + ProcessResult p = server.executeBrowser("EntryPointSignedSingleFirstInvalidSecondOk.html", ServerAccess.AutoClose.CLOSE_ON_BOTH); + Assert.assertTrue(p.stdout.contains(confirmation)); + Assert.assertTrue(p.stdout.contains(aok.getCondition())); + Assert.assertFalse(p.stderr.contains(aer.getCondition())); + } + + @Test + public void javawsHtml() throws Exception { + ProcessResult p = server.executeJavaws(Arrays.asList(new String[]{OptionsDefinitions.OPTIONS.HTML.option}), "EntryPointSignedSingleFirstInvalidSecondOk.html", new AutoOkClosingListener(), new AutoErrorClosingListener()); + Assert.assertTrue(p.stdout.contains(confirmation)); + Assert.assertTrue(p.stdout.contains(aok.getCondition())); + Assert.assertFalse(p.stderr.contains(aer.getCondition())); + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleInvalid/resources/EntryPointSignedSingleInvalid.html Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,42 @@ +<!-- + +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. + + --> +<html><head></head><body bgcolor="red"> +<p><applet code="EntryPointSignedSingleInvalid.class" archive="EntryPointSignedSingleInvalid.jar" codebase="." width="250" height="200"> +</applet></p> +</body> +</html> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleInvalid/resources/EntryPointSignedSingleInvalid.jnlp Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,53 @@ +<!-- + +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="EntryPointSignedSingleInvalid.jnlp" codebase="."> + <information> + <title>EntryPointSignedSingleInvalid</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>EntryPointSignedSingleInvalid</description> + <offline/> + </information> + <resources> + <j2se version="1.4+"/> + <jar href="EntryPointSignedSingleInvalid.jar"/> + </resources> + <application-desc main-class="EntryPointSignedSingleInvalid"> + </application-desc> +</jnlp> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleInvalid/resources/EntryPointSignedSingleInvalid_applet.jnlp Wed Jul 29 16:29:43 2015 +0200 @@ -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="EntryPointSignedSingleInvalid_applet.jnlp" codebase="."> + <information> + <title>EntryPointSignedSingleInvalid</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>EntryPointSignedSingleInvalid</description> + <offline/> + </information> + <resources> + <j2se version="1.4+"/> + <jar href="EntryPointSignedSingleInvalid.jar"/> + </resources> + <applet-desc + documentBase="." + name="EntryPointSignedSingleInvalid" + main-class="EntryPointSignedSingleInvalid" + width="250" + height="200"> + </applet-desc> +</jnlp> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleInvalid/resources/EntryPointSignedSingleInvalid_applet_security.jnlp Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,61 @@ +<!-- + +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="EntryPointSignedSingleInvalid_applet_security.jnlp" codebase="."> + <information> + <title>EntryPointSignedSingleInvalid</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>EntryPointSignedSingleInvalid</description> + <offline/> + </information> + <resources> + <j2se version="1.4+"/> + <jar href="EntryPointSignedSingleInvalid.jar"/> + </resources> + <security> + <all-permissions/> + </security> + <applet-desc + documentBase="." + name="EntryPointSignedSingleInvalid" + main-class="EntryPointSignedSingleInvalid" + width="250" + height="200"> + </applet-desc> +</jnlp> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleInvalid/resources/EntryPointSignedSingleInvalid_security.jnlp Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,56 @@ +<!-- + +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="EntryPointSignedSingleInvalid_security.jnlp" codebase="."> + <information> + <title>EntryPointSignedSingleInvalid</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>EntryPointSignedSingleInvalid</description> + <offline/> + </information> + <resources> + <j2se version="1.4+"/> + <jar href="EntryPointSignedSingleInvalid.jar"/> + </resources> + <security> + <all-permissions/> + </security> + <application-desc main-class="EntryPointSignedSingleInvalid"> + </application-desc> +</jnlp> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleInvalid/srcs/EntryPointSignedSingleInvalid.java Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,57 @@ + +import java.applet.Applet; + +/* AppletTest.java + Copyright (C) 2011 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 EntryPointSignedSingleInvalid extends Applet { + + @Override + public void init() { + confirm(); + } + + public static void main(String... s) { + confirm(); + } + + private static void confirm() { + System.out.println("*** applet running ***"); + System.out.println(System.getProperty("user.home")); + System.out.println("*** APPLET FINISHED ***"); + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleInvalid/srcs/META-INF/MANIFEST.MF Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Entry-Point: SomeDifferentMainClass +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleInvalid/testcases/EntryPointSignedSingleInvalidTest.java Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,125 @@ + +import java.io.IOException; +import java.util.Arrays; +import net.sourceforge.jnlp.OptionsDefinitions; +import net.sourceforge.jnlp.ProcessResult; +import net.sourceforge.jnlp.ServerAccess; +import net.sourceforge.jnlp.annotations.TestInBrowsers; +import net.sourceforge.jnlp.browsertesting.BrowserTest; +import static net.sourceforge.jnlp.browsertesting.BrowserTest.server; +import net.sourceforge.jnlp.browsertesting.Browsers; +import net.sourceforge.jnlp.closinglisteners.AutoErrorClosingListener; +import net.sourceforge.jnlp.closinglisteners.AutoOkClosingListener; +import net.sourceforge.jnlp.closinglisteners.StringBasedClosingListener; +import net.sourceforge.jnlp.config.DeploymentConfiguration; +import net.sourceforge.jnlp.runtime.ManifestAttributesChecker; +import net.sourceforge.jnlp.tools.DeploymentPropertiesModifier; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.BeforeClass; +import org.junit.Test; + +/* AppletTest.java + Copyright (C) 2011 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 EntryPointSignedSingleInvalidTest extends BrowserTest { + + private static final DeploymentPropertiesModifier dpm = new DeploymentPropertiesModifier(); + private static final StringBasedClosingListener aok = new AutoOkClosingListener(); + private static final StringBasedClosingListener aer = new AutoErrorClosingListener(); + private static final String confirmation = "*** applet running ***"; + + @BeforeClass + public static void setDeploymentManifestPermissionReadingOnly() throws IOException { + dpm.setProperties(DeploymentConfiguration.KEY_ENABLE_MANIFEST_ATTRIBUTES_CHECK, ManifestAttributesChecker.MANIFEST_ATTRIBUTES_CHECK.ENTRYPOINT.toString()); + } + + @AfterClass + public static void restoreDeploymentProeprtiees() throws IOException { + dpm.restoreProperties(); + } + + @Test + public void javawsAllPermNoSecurity() throws Exception { + ProcessResult p = server.executeJavawsHeadless("EntryPointSignedSingleInvalid.jnlp"); + Assert.assertFalse(p.stdout.contains(confirmation)); + Assert.assertFalse(p.stdout.contains(aok.getCondition())); + Assert.assertTrue(p.stderr.contains(aer.getCondition())); + } + + @Test + public void javawsAllPermAllSecurity() throws Exception { + ProcessResult p = server.executeJavawsHeadless("EntryPointSignedSingleInvalid_security.jnlp"); + Assert.assertFalse(p.stdout.contains(confirmation)); + Assert.assertFalse(p.stdout.contains(aok.getCondition())); + Assert.assertTrue(p.stderr.contains(aer.getCondition())); + } + + @Test + public void javawsAppletAllPermNoSecurity() throws Exception { + ProcessResult p = server.executeJavaws(Arrays.asList(new String[]{"-headless", "-verbose"}), "EntryPointSignedSingleInvalid_applet.jnlp", new AutoOkClosingListener(), new AutoErrorClosingListener()); + Assert.assertFalse(p.stdout.contains(confirmation)); + Assert.assertFalse(p.stdout.contains(aok.getCondition())); + Assert.assertTrue(p.stderr.contains(aer.getCondition())); + } + + @Test + public void javawsAppletAllPermAllSecurity() throws Exception { + ProcessResult p = server.executeJavawsHeadless("EntryPointSignedSingleInvalid_applet_security.jnlp", new AutoOkClosingListener(), new AutoErrorClosingListener()); + Assert.assertFalse(p.stdout.contains(confirmation)); + Assert.assertFalse(p.stdout.contains(aok.getCondition())); + Assert.assertTrue(p.stderr.contains(aer.getCondition())); + } + + @Test + @TestInBrowsers(testIn = Browsers.one) + public void appletAllPermAllSecurity() throws Exception { + server.getBrowserLocation(); + ProcessResult p = server.executeBrowser("EntryPointSignedSingleInvalid.html", ServerAccess.AutoClose.CLOSE_ON_BOTH); + Assert.assertFalse(p.stdout.contains(confirmation)); + Assert.assertFalse(p.stdout.contains(aok.getCondition())); + Assert.assertTrue(p.stderr.contains(aer.getCondition())); + } + + @Test + public void javawsHtml() throws Exception { + ProcessResult p = server.executeJavaws(Arrays.asList(new String[]{OptionsDefinitions.OPTIONS.HTML.option}), "EntryPointSignedSingleInvalid.html", new AutoOkClosingListener(), new AutoErrorClosingListener()); + Assert.assertFalse(p.stdout.contains(confirmation)); + Assert.assertFalse(p.stdout.contains(aok.getCondition())); + Assert.assertTrue(p.stderr.contains(aer.getCondition())); + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleOk/resources/EntryPointSignedSingleOk.html Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,42 @@ +<!-- + +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. + + --> +<html><head></head><body bgcolor="red"> +<p><applet code="EntryPointSignedSingleOk.class" archive="EntryPointSignedSingleOk.jar" codebase="." width="250" height="200"> +</applet></p> +</body> +</html> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleOk/resources/EntryPointSignedSingleOk.jnlp Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,53 @@ +<!-- + +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="EntryPointSignedSingleOk.jnlp" codebase="."> + <information> + <title>EntryPointSignedSingleOk</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>EntryPointSignedSingleOk</description> + <offline/> + </information> + <resources> + <j2se version="1.4+"/> + <jar href="EntryPointSignedSingleOk.jar"/> + </resources> + <application-desc main-class="EntryPointSignedSingleOk"> + </application-desc> +</jnlp> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleOk/resources/EntryPointSignedSingleOk_applet.jnlp Wed Jul 29 16:29:43 2015 +0200 @@ -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="EntryPointSignedSingleOk_applet.jnlp" codebase="."> + <information> + <title>EntryPointSignedSingleOk</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>EntryPointSignedSingleOk</description> + <offline/> + </information> + <resources> + <j2se version="1.4+"/> + <jar href="EntryPointSignedSingleOk.jar"/> + </resources> + <applet-desc + documentBase="." + name="EntryPointSignedSingleOk" + main-class="EntryPointSignedSingleOk" + width="250" + height="200"> + </applet-desc> +</jnlp> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleOk/resources/EntryPointSignedSingleOk_applet_security.jnlp Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,61 @@ +<!-- + +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="EntryPointSignedSingleOk_applet_security.jnlp" codebase="."> + <information> + <title>EntryPointSignedSingleOk</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>EntryPointSignedSingleOk</description> + <offline/> + </information> + <resources> + <j2se version="1.4+"/> + <jar href="EntryPointSignedSingleOk.jar"/> + </resources> + <security> + <all-permissions/> + </security> + <applet-desc + documentBase="." + name="EntryPointSignedSingleOk" + main-class="EntryPointSignedSingleOk" + width="250" + height="200"> + </applet-desc> +</jnlp> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleOk/resources/EntryPointSignedSingleOk_security.jnlp Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,56 @@ +<!-- + +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="EntryPointSignedSingleOk_security.jnlp" codebase="."> + <information> + <title>EntryPointSignedSingleOk</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>EntryPointSignedSingleOk</description> + <offline/> + </information> + <resources> + <j2se version="1.4+"/> + <jar href="EntryPointSignedSingleOk.jar"/> + </resources> + <security> + <all-permissions/> + </security> + <application-desc main-class="EntryPointSignedSingleOk"> + </application-desc> +</jnlp> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleOk/srcs/EntryPointSignedSingleOk.java Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,57 @@ + +import java.applet.Applet; + +/* AppletTest.java + Copyright (C) 2011 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 EntryPointSignedSingleOk extends Applet { + + @Override + public void init() { + confirm(); + } + + public static void main(String... s) { + confirm(); + } + + private static void confirm() { + System.out.println("*** applet running ***"); + System.out.println(System.getProperty("user.home")); + System.out.println("*** APPLET FINISHED ***"); + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleOk/srcs/META-INF/MANIFEST.MF Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Entry-Point: EntryPointSignedSingleOk +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleOk/testcases/EntryPointSignedSingleOkTest.java Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,124 @@ + +import java.io.IOException; +import java.util.Arrays; +import net.sourceforge.jnlp.OptionsDefinitions; +import net.sourceforge.jnlp.ProcessResult; +import net.sourceforge.jnlp.ServerAccess; +import net.sourceforge.jnlp.annotations.TestInBrowsers; +import net.sourceforge.jnlp.browsertesting.BrowserTest; +import static net.sourceforge.jnlp.browsertesting.BrowserTest.server; +import net.sourceforge.jnlp.browsertesting.Browsers; +import net.sourceforge.jnlp.closinglisteners.AutoErrorClosingListener; +import net.sourceforge.jnlp.closinglisteners.AutoOkClosingListener; +import net.sourceforge.jnlp.closinglisteners.StringBasedClosingListener; +import net.sourceforge.jnlp.config.DeploymentConfiguration; +import net.sourceforge.jnlp.runtime.ManifestAttributesChecker; +import net.sourceforge.jnlp.tools.DeploymentPropertiesModifier; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.BeforeClass; +import org.junit.Test; + +/* AppletTest.java + Copyright (C) 2011 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 EntryPointSignedSingleOkTest extends BrowserTest { + + private static final DeploymentPropertiesModifier dpm = new DeploymentPropertiesModifier(); + private static final StringBasedClosingListener aok = new AutoOkClosingListener(); + private static final StringBasedClosingListener aer = new AutoErrorClosingListener(); + private static final String confirmation = "*** applet running ***"; + @BeforeClass + public static void setDeploymentManifestPermissionReadingOnly() throws IOException{ + dpm.setProperties(DeploymentConfiguration.KEY_ENABLE_MANIFEST_ATTRIBUTES_CHECK, ManifestAttributesChecker.MANIFEST_ATTRIBUTES_CHECK.ENTRYPOINT.toString()); + } + + @AfterClass + public static void restoreDeploymentProeprtiees() throws IOException{ + dpm.restoreProperties(); + } + + @Test + public void javawsAllPermNoSecurity() throws Exception{ + ProcessResult p = server.executeJavawsHeadless("EntryPointSignedSingleOk.jnlp"); + Assert.assertTrue(p.stdout.contains(confirmation)); + Assert.assertFalse(p.stdout.contains(aok.getCondition())); + Assert.assertTrue(p.stderr.contains(aer.getCondition())); + } + @Test + public void javawsAllPermAllSecurity() throws Exception{ + ProcessResult p = server.executeJavawsHeadless("EntryPointSignedSingleOk_security.jnlp"); + Assert.assertTrue(p.stdout.contains(confirmation)); + Assert.assertTrue(p.stdout.contains(aok.getCondition())); + Assert.assertFalse(p.stderr.contains(aer.getCondition())); + } + + @Test + public void javawsAppletAllPermNoSecurity() throws Exception{ + ProcessResult p = server.executeJavaws(Arrays.asList(new String[]{"-headless", "-verbose"}), "EntryPointSignedSingleOk_applet.jnlp", new AutoOkClosingListener(), new AutoErrorClosingListener()); + Assert.assertTrue(p.stdout.contains(confirmation)); + Assert.assertFalse(p.stdout.contains(aok.getCondition())); + Assert.assertTrue(p.stderr.contains(aer.getCondition())); + } + @Test + public void javawsAppletAllPermAllSecurity() throws Exception{ + ProcessResult p = server.executeJavawsHeadless("EntryPointSignedSingleOk_applet_security.jnlp", new AutoOkClosingListener(), new AutoErrorClosingListener()); + Assert.assertTrue(p.stdout.contains(confirmation)); + Assert.assertTrue(p.stdout.contains(aok.getCondition())); + Assert.assertFalse(p.stderr.contains(aer.getCondition())); + } + + @Test + @TestInBrowsers(testIn = Browsers.one) + public void appletAllPermAllSecurity() throws Exception{ + server.getBrowserLocation(); + ProcessResult p = server.executeBrowser("EntryPointSignedSingleOk.html", ServerAccess.AutoClose.CLOSE_ON_BOTH); + Assert.assertTrue(p.stdout.contains(confirmation)); + Assert.assertTrue(p.stdout.contains(aok.getCondition())); + Assert.assertFalse(p.stderr.contains(aer.getCondition())); + } + + + @Test + public void javawsHtml() throws Exception { + ProcessResult p = server.executeJavaws(Arrays.asList(new String[]{OptionsDefinitions.OPTIONS.HTML.option}), "EntryPointSignedSingleOk.html", new AutoOkClosingListener(), new AutoErrorClosingListener()); + Assert.assertTrue(p.stdout.contains(confirmation)); + Assert.assertTrue(p.stdout.contains(aok.getCondition())); + Assert.assertFalse(p.stderr.contains(aer.getCondition())); + } + + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleSecondInvalidFirstOk/resources/EntryPointSignedSingleSecondInvalidFirstOk.html Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,42 @@ +<!-- + +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. + + --> +<html><head></head><body bgcolor="red"> +<p><applet code="EntryPointSignedSingleSecondInvalidFirstOk.class" archive="EntryPointSignedSingleSecondInvalidFirstOk.jar" codebase="." width="250" height="200"> +</applet></p> +</body> +</html> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleSecondInvalidFirstOk/resources/EntryPointSignedSingleSecondInvalidFirstOk.jnlp Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,53 @@ +<!-- + +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="EntryPointSignedSingleSecondInvalidFirstOk.jnlp" codebase="."> + <information> + <title>EntryPointSignedSingleSecondInvalidFirstOk</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>EntryPointSignedSingleSecondInvalidFirstOk</description> + <offline/> + </information> + <resources> + <j2se version="1.4+"/> + <jar href="EntryPointSignedSingleSecondInvalidFirstOk.jar"/> + </resources> + <application-desc main-class="EntryPointSignedSingleSecondInvalidFirstOk"> + </application-desc> +</jnlp> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleSecondInvalidFirstOk/resources/EntryPointSignedSingleSecondInvalidFirstOk_applet.jnlp Wed Jul 29 16:29:43 2015 +0200 @@ -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="EntryPointSignedSingleSecondInvalidFirstOk_applet.jnlp" codebase="."> + <information> + <title>EntryPointSignedSingleSecondInvalidFirstOk</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>EntryPointSignedSingleSecondInvalidFirstOk</description> + <offline/> + </information> + <resources> + <j2se version="1.4+"/> + <jar href="EntryPointSignedSingleSecondInvalidFirstOk.jar"/> + </resources> + <applet-desc + documentBase="." + name="EntryPointSignedSingleSecondInvalidFirstOk" + main-class="EntryPointSignedSingleSecondInvalidFirstOk" + width="250" + height="200"> + </applet-desc> +</jnlp> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleSecondInvalidFirstOk/resources/EntryPointSignedSingleSecondInvalidFirstOk_applet_security.jnlp Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,61 @@ +<!-- + +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="EntryPointSignedSingleSecondInvalidFirstOk_applet_security.jnlp" codebase="."> + <information> + <title>EntryPointSignedSingleSecondInvalidFirstOk</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>EntryPointSignedSingleSecondInvalidFirstOk</description> + <offline/> + </information> + <resources> + <j2se version="1.4+"/> + <jar href="EntryPointSignedSingleSecondInvalidFirstOk.jar"/> + </resources> + <security> + <all-permissions/> + </security> + <applet-desc + documentBase="." + name="EntryPointSignedSingleSecondInvalidFirstOk" + main-class="EntryPointSignedSingleSecondInvalidFirstOk" + width="250" + height="200"> + </applet-desc> +</jnlp> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleSecondInvalidFirstOk/resources/EntryPointSignedSingleSecondInvalidFirstOk_security.jnlp Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,56 @@ +<!-- + +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="EntryPointSignedSingleSecondInvalidFirstOk_security.jnlp" codebase="."> + <information> + <title>EntryPointSignedSingleSecondInvalidFirstOk</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>EntryPointSignedSingleSecondInvalidFirstOk</description> + <offline/> + </information> + <resources> + <j2se version="1.4+"/> + <jar href="EntryPointSignedSingleSecondInvalidFirstOk.jar"/> + </resources> + <security> + <all-permissions/> + </security> + <application-desc main-class="EntryPointSignedSingleSecondInvalidFirstOk"> + </application-desc> +</jnlp> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleSecondInvalidFirstOk/srcs/EntryPointSignedSingleSecondInvalidFirstOk.java Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,57 @@ + +import java.applet.Applet; + +/* AppletTest.java + Copyright (C) 2011 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 EntryPointSignedSingleSecondInvalidFirstOk extends Applet { + + @Override + public void init() { + confirm(); + } + + public static void main(String... s) { + confirm(); + } + + private static void confirm() { + System.out.println("*** applet running ***"); + System.out.println(System.getProperty("user.home")); + System.out.println("*** APPLET FINISHED ***"); + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleSecondInvalidFirstOk/srcs/META-INF/MANIFEST.MF Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Entry-Point: EntryPointSignedSingleSecondInvalidFirstOk SomeDifferentMainClass +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/signed/EntryPointSignedSingleSecondInvalidFirstOk/testcases/EntryPointSignedSingleSecondInvalidFirstOkTest.java Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,125 @@ + +import java.io.IOException; +import java.util.Arrays; +import net.sourceforge.jnlp.OptionsDefinitions; +import net.sourceforge.jnlp.ProcessResult; +import net.sourceforge.jnlp.ServerAccess; +import net.sourceforge.jnlp.annotations.TestInBrowsers; +import net.sourceforge.jnlp.browsertesting.BrowserTest; +import static net.sourceforge.jnlp.browsertesting.BrowserTest.server; +import net.sourceforge.jnlp.browsertesting.Browsers; +import net.sourceforge.jnlp.closinglisteners.AutoErrorClosingListener; +import net.sourceforge.jnlp.closinglisteners.AutoOkClosingListener; +import net.sourceforge.jnlp.closinglisteners.StringBasedClosingListener; +import net.sourceforge.jnlp.config.DeploymentConfiguration; +import net.sourceforge.jnlp.runtime.ManifestAttributesChecker; +import net.sourceforge.jnlp.tools.DeploymentPropertiesModifier; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.BeforeClass; +import org.junit.Test; + +/* AppletTest.java + Copyright (C) 2011 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 EntryPointSignedSingleSecondInvalidFirstOkTest extends BrowserTest { + + private static final DeploymentPropertiesModifier dpm = new DeploymentPropertiesModifier(); + private static final StringBasedClosingListener aok = new AutoOkClosingListener(); + private static final StringBasedClosingListener aer = new AutoErrorClosingListener(); + private static final String confirmation = "*** applet running ***"; + + @BeforeClass + public static void setDeploymentManifestPermissionReadingOnly() throws IOException { + dpm.setProperties(DeploymentConfiguration.KEY_ENABLE_MANIFEST_ATTRIBUTES_CHECK, ManifestAttributesChecker.MANIFEST_ATTRIBUTES_CHECK.ENTRYPOINT.toString()); + } + + @AfterClass + public static void restoreDeploymentProeprtiees() throws IOException { + dpm.restoreProperties(); + } + + @Test + public void javawsAllPermNoSecurity() throws Exception { + ProcessResult p = server.executeJavawsHeadless("EntryPointSignedSingleSecondInvalidFirstOk.jnlp"); + Assert.assertTrue(p.stdout.contains(confirmation)); + Assert.assertFalse(p.stdout.contains(aok.getCondition())); + Assert.assertTrue(p.stderr.contains(aer.getCondition())); + } + + @Test + public void javawsAllPermAllSecurity() throws Exception { + ProcessResult p = server.executeJavawsHeadless("EntryPointSignedSingleSecondInvalidFirstOk_security.jnlp"); + Assert.assertTrue(p.stdout.contains(confirmation)); + Assert.assertTrue(p.stdout.contains(aok.getCondition())); + Assert.assertFalse(p.stderr.contains(aer.getCondition())); + } + + @Test + public void javawsAppletAllPermNoSecurity() throws Exception { + ProcessResult p = server.executeJavaws(Arrays.asList(new String[]{"-headless", "-verbose"}), "EntryPointSignedSingleSecondInvalidFirstOk_applet.jnlp", new AutoOkClosingListener(), new AutoErrorClosingListener()); + Assert.assertTrue(p.stdout.contains(confirmation)); + Assert.assertFalse(p.stdout.contains(aok.getCondition())); + Assert.assertTrue(p.stderr.contains(aer.getCondition())); + } + + @Test + public void javawsAppletAllPermAllSecurity() throws Exception { + ProcessResult p = server.executeJavawsHeadless("EntryPointSignedSingleSecondInvalidFirstOk_applet_security.jnlp", new AutoOkClosingListener(), new AutoErrorClosingListener()); + Assert.assertTrue(p.stdout.contains(confirmation)); + Assert.assertTrue(p.stdout.contains(aok.getCondition())); + Assert.assertFalse(p.stderr.contains(aer.getCondition())); + } + + @Test + @TestInBrowsers(testIn = Browsers.one) + public void appletAllPermAllSecurity() throws Exception { + server.getBrowserLocation(); + ProcessResult p = server.executeBrowser("EntryPointSignedSingleSecondInvalidFirstOk.html", ServerAccess.AutoClose.CLOSE_ON_BOTH); + Assert.assertTrue(p.stdout.contains(confirmation)); + Assert.assertTrue(p.stdout.contains(aok.getCondition())); + Assert.assertFalse(p.stderr.contains(aer.getCondition())); + } + + @Test + public void javawsHtml() throws Exception { + ProcessResult p = server.executeJavaws(Arrays.asList(new String[]{OptionsDefinitions.OPTIONS.HTML.option}), "EntryPointSignedSingleSecondInvalidFirstOk.html", new AutoOkClosingListener(), new AutoErrorClosingListener()); + Assert.assertTrue(p.stdout.contains(confirmation)); + Assert.assertTrue(p.stdout.contains(aok.getCondition())); + Assert.assertFalse(p.stderr.contains(aer.getCondition())); + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/EntryPointUnsignedSingleInvalid/resources/EntryPointUnsignedSingleInvalid.html Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,42 @@ +<!-- + +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. + + --> +<html><head></head><body bgcolor="blue"> +<p><applet code="EntryPointUnsignedSingleInvalid.class" archive="EntryPointUnsignedSingleInvalid.jar" codebase="." width="250" height="200"> +</applet></p> +</body> +</html> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/EntryPointUnsignedSingleInvalid/resources/EntryPointUnsignedSingleInvalid.jnlp Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,53 @@ +<!-- + +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="EntryPointUnsignedSingleInvalid.jnlp" codebase="."> + <information> + <title>EntryPointUnsignedSingleInvalid</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>EntryPointUnsignedSingleInvalid</description> + <offline/> + </information> + <resources> + <j2se version="1.4+"/> + <jar href="EntryPointUnsignedSingleInvalid.jar"/> + </resources> + <application-desc main-class="EntryPointUnsignedSingleInvalid"> + </application-desc> +</jnlp> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/EntryPointUnsignedSingleInvalid/resources/EntryPointUnsignedSingleInvalid_applet.jnlp Wed Jul 29 16:29:43 2015 +0200 @@ -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="EntryPointUnsignedSingleInvalid_applet.jnlp" codebase="."> + <information> + <title>EntryPointUnsignedSingleInvalid</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>EntryPointUnsignedSingleInvalid</description> + <offline/> + </information> + <resources> + <j2se version="1.4+"/> + <jar href="EntryPointUnsignedSingleInvalid.jar"/> + </resources> + <applet-desc + documentBase="." + name="EntryPointUnsignedSingleInvalid" + main-class="EntryPointUnsignedSingleInvalid" + width="250" + height="200"> + </applet-desc> +</jnlp> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/EntryPointUnsignedSingleInvalid/resources/EntryPointUnsignedSingleInvalid_applet_security.jnlp Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,61 @@ +<!-- + +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="EntryPointUnsignedSingleInvalid_applet_security.jnlp" codebase="."> + <information> + <title>EntryPointUnsignedSingleInvalid</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>EntryPointUnsignedSingleInvalid</description> + <offline/> + </information> + <resources> + <j2se version="1.4+"/> + <jar href="EntryPointUnsignedSingleInvalid.jar"/> + </resources> + <security> + <all-permissions/> + </security> + <applet-desc + documentBase="." + name="EntryPointUnsignedSingleInvalid" + main-class="EntryPointUnsignedSingleInvalid" + width="250" + height="200"> + </applet-desc> +</jnlp> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/EntryPointUnsignedSingleInvalid/resources/EntryPointUnsignedSingleInvalid_security.jnlp Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,56 @@ +<!-- + +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="EntryPointUnsignedSingleInvalid_security.jnlp" codebase="."> + <information> + <title>EntryPointUnsignedSingleInvalid</title> + <vendor>IcedTea</vendor> + <homepage href="http://icedtea.classpath.org/wiki/IcedTea-Web#Testing_IcedTea-Web"/> + <description>EntryPointUnsignedSingleInvalid</description> + <offline/> + </information> + <resources> + <j2se version="1.4+"/> + <jar href="EntryPointUnsignedSingleInvalid.jar"/> + </resources> + <security> + <all-permissions/> + </security> + <application-desc main-class="EntryPointUnsignedSingleInvalid"> + </application-desc> +</jnlp> \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/EntryPointUnsignedSingleInvalid/srcs/EntryPointUnsignedSingleInvalid.java Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,57 @@ + +import java.applet.Applet; + +/* AppletTest.java + Copyright (C) 2011 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 EntryPointUnsignedSingleInvalid extends Applet { + + @Override + public void init() { + confirm(); + } + + public static void main(String... s) { + confirm(); + } + + private static void confirm() { + System.out.println("*** applet running ***"); + System.out.println(System.getProperty("user.home")); + System.out.println("*** APPLET FINISHED ***"); + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/EntryPointUnsignedSingleInvalid/srcs/META-INF/MANIFEST.MF Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Entry-Point: SomeDifferentMainClass +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/reproducers/simple/EntryPointUnsignedSingleInvalid/testcases/EntryPointUnsignedSingleInvalidTest.java Wed Jul 29 16:29:43 2015 +0200 @@ -0,0 +1,126 @@ + +import java.io.IOException; +import java.util.Arrays; +import net.sourceforge.jnlp.OptionsDefinitions; +import net.sourceforge.jnlp.ProcessResult; +import net.sourceforge.jnlp.ServerAccess; +import net.sourceforge.jnlp.annotations.TestInBrowsers; +import net.sourceforge.jnlp.browsertesting.BrowserTest; +import static net.sourceforge.jnlp.browsertesting.BrowserTest.server; +import net.sourceforge.jnlp.browsertesting.Browsers; +import net.sourceforge.jnlp.closinglisteners.AutoErrorClosingListener; +import net.sourceforge.jnlp.closinglisteners.AutoOkClosingListener; +import net.sourceforge.jnlp.closinglisteners.StringBasedClosingListener; +import net.sourceforge.jnlp.config.DeploymentConfiguration; +import net.sourceforge.jnlp.runtime.ManifestAttributesChecker; +import net.sourceforge.jnlp.tools.DeploymentPropertiesModifier; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.BeforeClass; +import org.junit.Test; + +/* AppletTest.java + Copyright (C) 2011 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 EntryPointUnsignedSingleInvalidTest extends BrowserTest { + + private static final DeploymentPropertiesModifier dpm = new DeploymentPropertiesModifier(); + private static final StringBasedClosingListener aok = new AutoOkClosingListener(); + private static final StringBasedClosingListener aer = new AutoErrorClosingListener(); + private static final String confirmation = "*** applet running ***"; + + //this test is moreover only testing that the attribute is ignored in unsigend app + @BeforeClass + public static void setDeploymentManifestPermissionReadingOnly() throws IOException { + dpm.setProperties(DeploymentConfiguration.KEY_ENABLE_MANIFEST_ATTRIBUTES_CHECK, ManifestAttributesChecker.MANIFEST_ATTRIBUTES_CHECK.ENTRYPOINT.toString()); + } + + @AfterClass + public static void restoreDeploymentProeprtiees() throws IOException { + dpm.restoreProperties(); + } + + @Test + public void javawsAllPermNoSecurity() throws Exception { + ProcessResult p = server.executeJavawsHeadless("EntryPointUnsignedSingleInvalid.jnlp"); + Assert.assertTrue(p.stdout.contains(confirmation)); + Assert.assertFalse(p.stdout.contains(aok.getCondition())); + Assert.assertTrue(p.stderr.contains(aer.getCondition())); + } + + @Test + public void javawsAllPermAllSecurity() throws Exception { + ProcessResult p = server.executeJavawsHeadless("EntryPointUnsignedSingleInvalid_security.jnlp"); + Assert.assertFalse(p.stdout.contains(confirmation)); + Assert.assertFalse(p.stdout.contains(aok.getCondition())); + Assert.assertTrue(p.stderr.contains(aer.getCondition())); + } + + @Test + public void javawsAppletAllPermNoSecurity() throws Exception { + ProcessResult p = server.executeJavaws(Arrays.asList(new String[]{"-headless", "-verbose"}), "EntryPointUnsignedSingleInvalid_applet.jnlp", new AutoOkClosingListener(), new AutoErrorClosingListener()); + Assert.assertTrue(p.stdout.contains(confirmation)); + Assert.assertFalse(p.stdout.contains(aok.getCondition())); + Assert.assertTrue(p.stderr.contains(aer.getCondition())); + } + + @Test + public void javawsAppletAllPermAllSecurity() throws Exception { + ProcessResult p = server.executeJavawsHeadless("EntryPointUnsignedSingleInvalid_applet_security.jnlp", new AutoOkClosingListener(), new AutoErrorClosingListener()); + Assert.assertFalse(p.stdout.contains(confirmation)); + Assert.assertFalse(p.stdout.contains(aok.getCondition())); + Assert.assertTrue(p.stderr.contains(aer.getCondition())); + } + + @Test + @TestInBrowsers(testIn = Browsers.one) + public void appletAllPermAllSecurity() throws Exception { + server.getBrowserLocation(); + ProcessResult p = server.executeBrowser("EntryPointUnsignedSingleInvalid.html", ServerAccess.AutoClose.CLOSE_ON_BOTH); + Assert.assertTrue(p.stdout.contains(confirmation)); + Assert.assertFalse(p.stdout.contains(aok.getCondition())); + Assert.assertTrue(p.stderr.contains(aer.getCondition())); + } + + @Test + public void javawsHtml() throws Exception { + ProcessResult p = server.executeJavaws(Arrays.asList(new String[]{OptionsDefinitions.OPTIONS.HTML.option}), "EntryPointUnsignedSingleInvalid.html", new AutoOkClosingListener(), new AutoErrorClosingListener()); + Assert.assertTrue(p.stdout.contains(confirmation)); + Assert.assertFalse(p.stdout.contains(aok.getCondition())); + Assert.assertTrue(p.stderr.contains(aer.getCondition())); + } + +}