mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8260925: HttpsURLConnection does not work with other JSSE provider.
Reviewed-by: xuelei
This commit is contained in:
parent
dbef0ec95d
commit
80182f92db
1 changed files with 5 additions and 0 deletions
|
@ -39,6 +39,7 @@ import java.net.InetSocketAddress;
|
||||||
import java.net.Proxy;
|
import java.net.Proxy;
|
||||||
import java.security.Principal;
|
import java.security.Principal;
|
||||||
import java.security.cert.*;
|
import java.security.cert.*;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.StringTokenizer;
|
import java.util.StringTokenizer;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
|
@ -565,6 +566,10 @@ final class HttpsClient extends HttpClient
|
||||||
// will do the spoof checks in SSLSocket.
|
// will do the spoof checks in SSLSocket.
|
||||||
SSLParameters paramaters = s.getSSLParameters();
|
SSLParameters paramaters = s.getSSLParameters();
|
||||||
paramaters.setEndpointIdentificationAlgorithm("HTTPS");
|
paramaters.setEndpointIdentificationAlgorithm("HTTPS");
|
||||||
|
// host has been set previously for SSLSocketImpl
|
||||||
|
if (!(s instanceof SSLSocketImpl)) {
|
||||||
|
paramaters.setServerNames(List.of(new SNIHostName(host)));
|
||||||
|
}
|
||||||
s.setSSLParameters(paramaters);
|
s.setSSLParameters(paramaters);
|
||||||
|
|
||||||
needToCheckSpoofing = false;
|
needToCheckSpoofing = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue