summaryrefslogtreecommitdiff
path: root/user/openjdk11/Alpine_Bug_10126.java
diff options
context:
space:
mode:
authorZach van Rijn <me@zv.io>2022-02-04 23:53:21 +0000
committerZach van Rijn <me@zv.io>2022-11-02 11:12:02 -0500
commitb30ada73c5c60a605056d08f87dc7e15af60cfb8 (patch)
treeebc7b687207b09986892252b66484fb8b47471fc /user/openjdk11/Alpine_Bug_10126.java
parentcbcd0f6720324b38a76b1c0ae6d3df73492d198e (diff)
downloadpackages-b30ada73c5c60a605056d08f87dc7e15af60cfb8.tar.gz
packages-b30ada73c5c60a605056d08f87dc7e15af60cfb8.tar.bz2
packages-b30ada73c5c60a605056d08f87dc7e15af60cfb8.tar.xz
packages-b30ada73c5c60a605056d08f87dc7e15af60cfb8.zip
user/openjdk11: new package
Diffstat (limited to 'user/openjdk11/Alpine_Bug_10126.java')
-rw-r--r--user/openjdk11/Alpine_Bug_10126.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/user/openjdk11/Alpine_Bug_10126.java b/user/openjdk11/Alpine_Bug_10126.java
new file mode 100644
index 000000000..a381c9ed7
--- /dev/null
+++ b/user/openjdk11/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");
+ }
+}
+