From 7ea869124ca52eebee7ab0a5a307e04422346fb8 Mon Sep 17 00:00:00 2001
From: Shivangi Gupta
Date: Tue, 1 Oct 2024 09:36:44 +0000
Subject: [PATCH 1/2] 8338380: Update TLSCommon/interop/AbstractServer to
specify an interface to listen for connections
Backport-of: 0b5c8870e5aa4fd0889d60faa9b1f65a9c338fff
---
.../net/ssl/TLSCommon/interop/AbstractServer.java | 14 +++++++++++++-
.../javax/net/ssl/TLSCommon/interop/JdkServer.java | 6 ++++--
2 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/test/jdk/javax/net/ssl/TLSCommon/interop/AbstractServer.java b/test/jdk/javax/net/ssl/TLSCommon/interop/AbstractServer.java
index a5f61ce869a..03b3aadb007 100644
--- a/test/jdk/javax/net/ssl/TLSCommon/interop/AbstractServer.java
+++ b/test/jdk/javax/net/ssl/TLSCommon/interop/AbstractServer.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -22,6 +22,8 @@
*/
import java.io.IOException;
+import java.net.InetAddress;
+import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
@@ -52,11 +54,21 @@ public void signalStop() throws Exception { }
public static abstract class Builder extends AbstractPeer.Builder {
+ private InetAddress listenInterface = InetAddress.getLoopbackAddress();
private int port;
// Indicates if requires client authentication.
private boolean clientAuth = true;
+ public InetAddress getListenInterface() {
+ return listenInterface;
+ }
+
+ public Builder setListenInterface(InetAddress listenInterface) {
+ this.listenInterface = listenInterface;
+ return this;
+ }
+
public int getPort() {
return port;
}
diff --git a/test/jdk/javax/net/ssl/TLSCommon/interop/JdkServer.java b/test/jdk/javax/net/ssl/TLSCommon/interop/JdkServer.java
index 6519e89febb..1521325b65a 100644
--- a/test/jdk/javax/net/ssl/TLSCommon/interop/JdkServer.java
+++ b/test/jdk/javax/net/ssl/TLSCommon/interop/JdkServer.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -22,6 +22,7 @@
*/
import java.io.IOException;
+import java.net.InetAddress;
import java.net.SocketException;
import java.util.ArrayList;
import java.util.List;
@@ -53,7 +54,8 @@ public JdkServer(Builder builder) throws Exception {
context = Utilities.createSSLContext(builder.getCertTuple());
SSLServerSocketFactory serverFactory = context.getServerSocketFactory();
serverSocket
- = (SSLServerSocket) serverFactory.createServerSocket(builder.getPort());
+ = (SSLServerSocket) serverFactory.createServerSocket(builder.getPort(),
+ 0, builder.getListenInterface());
configServerSocket(builder);
}
From bbbe1e539508c18bf1d0c67d7ca0122cdfc6b397 Mon Sep 17 00:00:00 2001
From: George Adams
Date: Tue, 1 Oct 2024 13:58:59 +0000
Subject: [PATCH 2/2] 8340804: doc/building.md update Xcode instructions to
note that full install is required
Backport-of: b639661e797fb52ce32ce397a153c886fdc40f53
---
doc/building.html | 7 +++----
doc/building.md | 10 +++-------
2 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/doc/building.html b/doc/building.html
index 70753155312..c91d876246c 100644
--- a/doc/building.html
+++ b/doc/building.html
@@ -614,10 +614,9 @@ clang
--with-toolchain-type=clang
.
Apple Xcode
The oldest supported version of Xcode is 13.0.
-You will need the Xcode command line developer tools to be able to
-build the JDK. (Actually, only the command line tools are
-needed, not the IDE.) The simplest way to install these is to run:
-xcode-select --install
+You will need to download Xcode either from the App Store or specific
+versions can be easily located via the Xcode Releases website.
When updating Xcode, it is advisable to keep an older version for
building the JDK. To use a specific version of Xcode you have multiple
options:
diff --git a/doc/building.md b/doc/building.md
index 51ac0cad7d9..47ad9e7c72b 100644
--- a/doc/building.md
+++ b/doc/building.md
@@ -422,13 +422,9 @@ To use clang instead of gcc on Linux, use `--with-toolchain-type=clang`.
The oldest supported version of Xcode is 13.0.
-You will need the Xcode command line developer tools to be able to build the
-JDK. (Actually, *only* the command line tools are needed, not the IDE.) The
-simplest way to install these is to run:
-
-```
-xcode-select --install
-```
+You will need to download Xcode either from the App Store or specific versions
+can be easily located via the [Xcode Releases](https://xcodereleases.com)
+website.
When updating Xcode, it is advisable to keep an older version for building the
JDK. To use a specific version of Xcode you have multiple options: