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 java.io.File;
25 import java.nio.file.Files;
26 import java.nio.file.Paths;
27 import java.security.AccessControlException;
28 import java.security.AccessController;
29 import java.security.Permission;
30 import java.security.PrivilegedAction;
31 import jdk.testlibrary.ProcessTools;
32
33 /**
34 * @test
35 * @bug 8048360
36 * @summary test policy entry with signedBy alias
37 * @library /lib/testlibrary
38 * @run main/othervm SignedJarTest
39 */
40 public class SignedJarTest {
41
42 private static final String FS = File.separator;
43 private static final String JAVA_HOME = System.getProperty("test.jdk");
44 private static final String TESTCLASSES = System.getProperty("test.classes", "");
45 private static final String TESTSRC = System.getProperty("test.src", "");
46 private static final String KEYTOOL = JAVA_HOME + FS + "bin" + FS + "keytool";
47 private static final String JAR = JAVA_HOME + FS + "bin" + FS + "jar";
48 private static final String JARSIGNER = JAVA_HOME + FS + "bin" + FS + "jarsigner";
49 private static final String PASSWORD = "password";
50 private static final String PWDFILE = "keypass";
51 private static final String POLICY1 = "SignedJarTest_1.policy";
52 private static final String POLICY2 = "SignedJarTest_2.policy";
53 private static final String KEYSTORE1 = "both.jks";
54 private static final String KEYSTORE2 = "first.jks";
55
56 public static void main(String args[]) throws Throwable {
57 //copy PrivilegeTest.class, policy files and keystore password file into current direcotry
|
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 java.io.File;
25 import java.nio.file.Files;
26 import java.nio.file.Paths;
27 import java.security.AccessControlException;
28 import java.security.AccessController;
29 import java.security.Permission;
30 import java.security.PrivilegedAction;
31 import jdk.test.lib.process.ProcessTools;
32
33 /**
34 * @test
35 * @bug 8048360
36 * @summary test policy entry with signedBy alias
37 * @library /test/lib
38 * @run main/othervm SignedJarTest
39 */
40 public class SignedJarTest {
41
42 private static final String FS = File.separator;
43 private static final String JAVA_HOME = System.getProperty("test.jdk");
44 private static final String TESTCLASSES = System.getProperty("test.classes", "");
45 private static final String TESTSRC = System.getProperty("test.src", "");
46 private static final String KEYTOOL = JAVA_HOME + FS + "bin" + FS + "keytool";
47 private static final String JAR = JAVA_HOME + FS + "bin" + FS + "jar";
48 private static final String JARSIGNER = JAVA_HOME + FS + "bin" + FS + "jarsigner";
49 private static final String PASSWORD = "password";
50 private static final String PWDFILE = "keypass";
51 private static final String POLICY1 = "SignedJarTest_1.policy";
52 private static final String POLICY2 = "SignedJarTest_2.policy";
53 private static final String KEYSTORE1 = "both.jks";
54 private static final String KEYSTORE2 = "first.jks";
55
56 public static void main(String args[]) throws Throwable {
57 //copy PrivilegeTest.class, policy files and keystore password file into current direcotry
|