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

Vyom Tewari vtewari at openjdk.java.net
Tue Mar 2 05:51:05 UTC 2021


HttpsURLConnection, works with SunJSSE provider but does not work with other JSSE provider. In case of SunJSSE , HttpsURLConnection set the host name as follows

s = (SSLSocket)serverSocket;
   if (s instanceof SSLSocketImpl) {
          ((SSLSocketImpl)s).setHost(host);
   } 

But in case of other providers(BouncyCastleProvider )  host will not get set and "java.security.cert.CertificateException: No subject alternative name found matching IP address" exception will be thrown.

-------------

Commit messages:
 - fixed jcheck failure
 - JDK-8260925: HttpsURLConnection does not work  with other JSSE provider.

Changes: https://git.openjdk.java.net/jdk/pull/2583/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2583&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8260925
  Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2583.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2583/head:pull/2583

PR: https://git.openjdk.java.net/jdk/pull/2583


More information about the net-dev mailing list