Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDK-8260925: HttpsURLConnection does not work with other JSSE provider. #2583

Closed
wants to merge 8 commits into from
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@
import java.net.Proxy;
import java.security.Principal;
import java.security.cert.*;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.StringTokenizer;
import java.util.Vector;
@@ -566,7 +566,7 @@ public void afterConnect() throws IOException, UnknownHostException {
// will do the spoof checks in SSLSocket.
SSLParameters paramaters = s.getSSLParameters();
paramaters.setEndpointIdentificationAlgorithm("HTTPS");
paramaters.setServerNames(Collections.singletonList(new SNIHostName(host)));
paramaters.setServerNames(List.of(new SNIHostName(host)));
s.setSSLParameters(paramaters);

needToCheckSpoofing = false;