aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf <thomas.wolf@paranor.ch>2021-07-25 15:44:35 +0200
committerThomas Wolf <thomas.wolf@paranor.ch>2021-07-25 15:48:26 +0200
commit2d73c702d3e9128b7dc03a01fe2cf18f119d3ffe (patch)
tree25208a4f0e77bb9f63cd3dcc7ead460757816546
parentcbb9188cdab672d5cc6f8632a3c64b837a29ebdd (diff)
downloadjgit-2d73c702d3e9128b7dc03a01fe2cf18f119d3ffe.tar.gz
jgit-2d73c702d3e9128b7dc03a01fe2cf18f119d3ffe.zip
[test] Create keystore with the keytool of the running JDK
Call keytool with the absolute path of "java.home". Otherwise a keytool for a different, maybe even newer Java version might be picked up, and then the keystore may not be readable by the JVM used to run the tests. Change-Id: Iea77024947a34267f008847d81312fe0abadc615 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
-rw-r--r--org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java
index f9f8c856b8..0f052987e3 100644
--- a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java
+++ b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java
@@ -181,9 +181,12 @@ public class AppServer {
tmpDir.deleteOnExit();
makePrivate(tmpDir);
File keyStore = new File(tmpDir, "keystore.jks");
+ File keytool = new File(
+ new File(new File(System.getProperty("java.home")), "bin"),
+ "keytool");
Runtime.getRuntime().exec(
new String[] {
- "keytool", //
+ keytool.getAbsolutePath(), //
"-keystore", keyStore.getAbsolutePath(), //
"-storepass", keyPassword,
"-alias", hostName, //