浏览代码

Merge pull request #5232 from infosiftr/java-ca-certificates

Add new "java-ca-certificates" to verify proper SSL functionality
Tianon Gravi 7 年之前
父节点
当前提交
c0546c804c
共有 3 个文件被更改,包括 16 次插入0 次删除
  1. 1 0
      test/config.sh
  2. 14 0
      test/tests/java-ca-certificates/container.java
  3. 1 0
      test/tests/java-ca-certificates/run.sh

+ 1 - 0
test/config.sh

@@ -135,6 +135,7 @@ imageTests+=(
 	[openjdk]='
 		java-hello-world
 		java-uimanager-font
+		java-ca-certificates
 	'
 	[open-liberty]='
 		open-liberty-hello-world

+ 14 - 0
test/tests/java-ca-certificates/container.java

@@ -0,0 +1,14 @@
+import java.net.URL;
+
+public class container {
+	public static void main(String[] args) {
+		try {
+			new URL("https://google.com").openStream(); // force a CA certificate lookup
+			System.exit(0);
+		}
+		catch (Exception e) {
+			e.printStackTrace();
+		}
+		System.exit(1);
+	}
+}

+ 1 - 0
test/tests/java-ca-certificates/run.sh

@@ -0,0 +1 @@
+../run-java-in-container.sh