1 /* |
1 /* |
2 * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
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 |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
24 /* |
24 /* |
25 * @test |
25 * @test |
26 * @bug 4924188 |
26 * @bug 4924188 |
27 * @summary sign a JAR file that has entry names with non-ASCII characters. |
27 * @summary sign a JAR file that has entry names with non-ASCII characters. |
28 * @modules jdk.jartool/sun.security.tools.jarsigner |
28 * @modules jdk.jartool/sun.security.tools.jarsigner |
|
29 * @run main/othervm JarSigningNonAscii |
29 */ |
30 */ |
30 |
31 |
31 import sun.security.tools.*; |
32 import sun.security.tools.*; |
32 import java.io.*; |
33 import java.io.*; |
|
34 import java.security.Security; |
33 import java.util.*; |
35 import java.util.*; |
34 import java.util.jar.*; |
36 import java.util.jar.*; |
35 import java.security.cert.Certificate; |
37 import java.security.cert.Certificate; |
36 |
38 |
37 public class JarSigningNonAscii { |
39 public class JarSigningNonAscii { |
38 |
40 |
39 private static String jarFile; |
41 private static String jarFile; |
40 private static String keystore; |
42 private static String keystore; |
41 |
43 |
42 public static void main(String[] args) throws Exception { |
44 public static void main(String[] args) throws Exception { |
|
45 Security.setProperty("jdk.jar.disabledAlgorithms", ""); |
43 |
46 |
44 String srcDir = System.getProperty("test.src", "."); |
47 String srcDir = System.getProperty("test.src", "."); |
45 String destDir = System.getProperty("test.classes", "."); |
48 String destDir = System.getProperty("test.classes", "."); |
46 String unsignedJar = srcDir + "/JarSigning_RU.jar"; |
49 String unsignedJar = srcDir + "/JarSigning_RU.jar"; |
47 String signedJar = destDir + "/JarSigning_RU.signed.jar"; |
50 String signedJar = destDir + "/JarSigning_RU.signed.jar"; |