Browse Source

Add new "java-ca-certificates" to verify proper SSL functionality

Tianon Gravi 6 years ago
parent
commit
1a35645500

+ 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