summaryrefslogtreecommitdiff
path: root/user/openjdk15/Alpine_Bug_10126.java
diff options
context:
space:
mode:
Diffstat (limited to 'user/openjdk15/Alpine_Bug_10126.java')
-rw-r--r--user/openjdk15/Alpine_Bug_10126.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/user/openjdk15/Alpine_Bug_10126.java b/user/openjdk15/Alpine_Bug_10126.java
new file mode 100644
index 000000000..a381c9ed7
--- /dev/null
+++ b/user/openjdk15/Alpine_Bug_10126.java
@@ -0,0 +1,13 @@
+public class Alpine_Bug_10126 {
+ public static void main(String[] args) throws Exception {
+ try (java.net.Socket sock = javax.net.ssl.SSLSocketFactory.getDefault().createSocket("gitlab.alpinelinux.org", 443);
+ java.io.InputStream in = sock.getInputStream();
+ java.io.OutputStream out = sock.getOutputStream()) {
+ out.write("GET / HTTP/1.0\n\nHost: gitlab.alpinelinux.org\n\nConnection: close\n\n\n\n".getBytes());
+ out.flush();
+ while (in.read(new byte[1024]) != -1) ;
+ }
+ System.out.println("Secured connection performed successfully");
+ }
+}
+