提交 e47ffa50 编写于 作者: V vinnie

8028377: test/sun/security/provider/KeyStore/DKSTest.sh attempts to write to ${test.src}

Reviewed-by: alanb, weijun
上级 857f0893
......@@ -38,6 +38,7 @@ import java.util.*;
public class DKSTest {
private static final String TEST_SRC = System.getProperty("test.src");
private static final String USER_DIR = System.getProperty("user.dir");
private static final String CERT = TEST_SRC + "/../../pkcs12/trusted.pem";
private static final String CONFIG = "file://" + TEST_SRC + "/domains.cfg";
private static final Map<String, KeyStore.ProtectionParameter> PASSWORDS =
......@@ -60,19 +61,6 @@ public class DKSTest {
}};
public static void main(String[] args) throws Exception {
try {
main0();
} finally {
// cleanup
new File(TEST_SRC + "/empty.jks").delete();
new File(TEST_SRC + "/Alias.keystore_tmp").delete();
new File(TEST_SRC + "/pw.jks_tmp").delete();
new File(TEST_SRC + "/secp256r1server-secp384r1ca.p12_tmp").delete();
new File(TEST_SRC + "/sect193r1server-rsa1024ca.p12_tmp").delete();
}
}
private static void main0() throws Exception {
/*
* domain keystore: system
*/
......@@ -120,7 +108,7 @@ public class DKSTest {
empty.load(null, null);
try (OutputStream outStream =
new FileOutputStream(TEST_SRC + "/empty.jks")) {
new FileOutputStream(new File(USER_DIR, "empty.jks"))) {
empty.store(outStream, "passphrase".toCharArray());
}
config = new URI(CONFIG + "#empty");
......
......@@ -35,14 +35,14 @@ domain keystores_tmp
keystoreType="PKCS12" {
keystore policy_keystore
keystoreType="JKS"
keystoreURI="${test.src}/Alias.keystore_tmp";
keystoreURI="${user.dir}/Alias.keystore_tmp";
keystore pw_keystore
keystoreType="CaseExactJKS"
keystoreURI="${test.src}/pw.jks_tmp";
keystoreURI="${user.dir}/pw.jks_tmp";
keystore eckeystore1
keystoreURI="${test.src}/sect193r1server-rsa1024ca.p12_tmp";
keystoreURI="${user.dir}/sect193r1server-rsa1024ca.p12_tmp";
keystore eckeystore2
keystoreURI="${test.src}/secp256r1server-secp384r1ca.p12_tmp";
keystoreURI="${user.dir}/secp256r1server-secp384r1ca.p12_tmp";
};
// domain where passwords are supplied via environment variables
......@@ -61,5 +61,5 @@ domain empty
keystoreType="JKS"
keystoreProviderName="SUN" {
keystore empty
keystoreURI="${test.src}/empty.jks";
keystoreURI="${user.dir}/empty.jks";
};
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册