1 /*
2 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 import TVJar.TVPermission;
25 import java.io.File;
26 import java.nio.file.Files;
27 import java.nio.file.Paths;
28 import java.security.AccessController;
29 import jdk.testlibrary.ProcessTools;
30 import jdk.testlibrary.JarUtils;
31
32 /**
33 * @test
34 * @bug 8050402
35 * @summary Check policy is extensible with user defined permissions
36 * @library /lib/testlibrary
37 * @compile TVJar/TVPermission.java
38 * @run main ExtensiblePolicyWithJarTest
39 */
40 public class ExtensiblePolicyWithJarTest {
41
42 public static void main(String args[]) throws Throwable {
43 final String FS = File.separator;
44 final String PS = File.pathSeparator;
45 final String POL = "ExtensiblePolicyTest3.policy";
46 final String JAVA_HOME = System.getProperty("test.jdk");
47 final String KEYTOOL = JAVA_HOME + FS + "bin" + FS + "keytool";
48 final String JARSIGNER = JAVA_HOME + FS + "bin" + FS + "jarsigner";
49 final String KEYSTORE = "epkeystore";
50 final String PASSWORD = "password";
51 final String ALIAS = "duke2";
52 final String CLASSPATH = System.getProperty("test.class.path", "");
53 final String TESTCLASSES = System.getProperty("test.classes", "");
54 final String TVPERMJAR = "tvPerm.jar";
55 final String PATHTOJAR = System.getProperty("user.dir", "")
56 + FS + TVPERMJAR;
|
1 /*
2 * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 import TVJar.TVPermission;
25 import java.io.File;
26 import java.nio.file.Files;
27 import java.nio.file.Paths;
28 import java.security.AccessController;
29 import jdk.testlibrary.ProcessTools;
30 import jdk.test.lib.util.JarUtils;
31
32 /**
33 * @test
34 * @bug 8050402
35 * @summary Check policy is extensible with user defined permissions
36 * @library /lib/testlibrary /test/lib
37 * @compile TVJar/TVPermission.java
38 * @run main ExtensiblePolicyWithJarTest
39 */
40 public class ExtensiblePolicyWithJarTest {
41
42 public static void main(String args[]) throws Throwable {
43 final String FS = File.separator;
44 final String PS = File.pathSeparator;
45 final String POL = "ExtensiblePolicyTest3.policy";
46 final String JAVA_HOME = System.getProperty("test.jdk");
47 final String KEYTOOL = JAVA_HOME + FS + "bin" + FS + "keytool";
48 final String JARSIGNER = JAVA_HOME + FS + "bin" + FS + "jarsigner";
49 final String KEYSTORE = "epkeystore";
50 final String PASSWORD = "password";
51 final String ALIAS = "duke2";
52 final String CLASSPATH = System.getProperty("test.class.path", "");
53 final String TESTCLASSES = System.getProperty("test.classes", "");
54 final String TVPERMJAR = "tvPerm.jar";
55 final String PATHTOJAR = System.getProperty("user.dir", "")
56 + FS + TVPERMJAR;
|