diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2021-11-24 00:04:25 +0100 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2021-11-24 09:17:07 +0100 |
commit | 791d3b0eb44ba062f02be209cb77ff75be99da39 (patch) | |
tree | cbac0a2468d00121b9653ad203b269305e7dc105 /org.eclipse.jgit.junit.http/src/org/eclipse/jgit | |
parent | 32b1a1b3a3a686fbda71fad67581f5d5808bc076 (diff) | |
download | jgit-791d3b0eb44ba062f02be209cb77ff75be99da39.tar.gz jgit-791d3b0eb44ba062f02be209cb77ff75be99da39.zip |
AppServer: fix keystore used to setup test SSL context factory
- configure dName
- add SANs ip:127.0.0.1, ip:[::1]
See jetty's own test setup in
https://github.com/eclipse/jetty.project/blob/1cd15e8d85feb308527c3df560734fc2ca1bc13c/jetty-client/src/test/resources/readme_keystores.txt#L6
and the fixes done in
https://github.com/eclipse/jetty.project/commit/1cd15e8d85feb308527c3df560734fc2ca1bc13c
Change-Id: Ie3260db7a7090dfa92b43eb32bf247640ebf8482
Diffstat (limited to 'org.eclipse.jgit.junit.http/src/org/eclipse/jgit')
-rw-r--r-- | org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java | 7 |
1 files changed, 5 insertions, 2 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 58646914c1..36f2f2bc7f 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 @@ -180,7 +180,7 @@ public class AppServer { String hostName, String ip) { SslContextFactory.Server factory = new SslContextFactory.Server(); - String dName = "CN=,OU=,O=,ST=,L=,C="; + String dName = "CN=localhost,OU=JGit,O=Eclipse,ST=Ontario,L=Toronto,C=CA"; try { File tmpDir = Files.createTempDirectory("jks").toFile(); @@ -196,8 +196,11 @@ public class AppServer { "-keystore", keyStore.getAbsolutePath(), // "-storepass", keyPassword, "-alias", hostName, // + "-ext", "bc=ca:true", // "-ext", - String.format("san=IP:%s,DNS:%s", ip, hostName), // + String.format( + "san=ip:%s,ip:127.0.0.1,ip:[::1],DNS:%s", + ip, hostName), // "-genkeypair", // "-keyalg", "RSA", // "-keypass", keyPassword, // |