Reviewer needed - backport of two fixes of regression tests sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/*Identities.java
Dr Andrew John Hughes
ahughes at redhat.com
Mon Dec 6 14:03:35 PST 2010
On 18:48 Mon 06 Dec , Pavel Tisnovsky wrote:
> Hi all,
>
> can anybody please review two patches containing backports of regression
> tests
> sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/*Identities.java?
> (one patch also makes corrections im another tests - properly closing
> sockets in finally block, etc.)
>
> These two backports (taken from OpenJDK7) fixes two bugs:
>
> 6941936: Broken pipe error of test case DNSIdentities.java
> Reviewed-by: chegar
>
> 6943219:
> test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/DNSIdentities.java
> fail in linux
> Reviewed-by: andrew
>
>
> hg export generated against IcedTea6 HEAD is included in attachment.
>
> PS: IMHO it's worth to push (backport) these fixes to OpenJDK6 too, I'm
> going to create webrew tomorrow.
>
> Cheers
> Pavel
Looks good to me. Thanks for catching.
> # HG changeset patch
> # User ptisnovs
> # Date 1291656414 -3600
> # Node ID 091a6344bf0490d5f708be057b81a72a6c132c32
> # Parent 531713add3350518bb3673b6f6014829a4005c06
> Backport of regression test fix.
>
> diff -r 531713add335 -r 091a6344bf04 ChangeLog
> --- a/ChangeLog Mon Dec 06 11:53:07 2010 +0100
> +++ b/ChangeLog Mon Dec 06 18:26:54 2010 +0100
> @@ -1,3 +1,11 @@
> +2010-12-06 Pavel Tisnovsky <ptisnovs at redhat.com>
> +
> + * Makefile.am:
> + (ICEDTEA_PATCHES): Updated.
> + * patches/openjdk/6941936-broken-pipe.patch:
> + * patches/openjdk/6943219-failure-in-linux.patch:
> + Backport of regression test fix.
> +
> 2010-12-06 Pavel Tisnovsky <ptisnovs at redhat.com>
>
> * Makefile.am:
> diff -r 531713add335 -r 091a6344bf04 Makefile.am
> --- a/Makefile.am Mon Dec 06 11:53:07 2010 +0100
> +++ b/Makefile.am Mon Dec 06 18:26:54 2010 +0100
> @@ -304,7 +304,9 @@
> patches/jtreg-WindowWithWarningTest.patch \
> patches/jtreg-T6638712-fix.patch \
> patches/openjdk/7002666-eclipse_cdt_oops_crash.patch \
> - patches/jtreg-T6650759m-fix.patch
> + patches/jtreg-T6650759m-fix.patch \
> + patches/openjdk/6941936-broken-pipe.patch \
> + patches/openjdk/6943219-failure-in-linux.patch
>
> if WITH_ALT_HSBUILD
> ICEDTEA_PATCHES += \
> diff -r 531713add335 -r 091a6344bf04 patches/openjdk/6941936-broken-pipe.patch
> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
> +++ b/patches/openjdk/6941936-broken-pipe.patch Mon Dec 06 18:26:54 2010 +0100
> @@ -0,0 +1,438 @@
> +# HG changeset patch
> +# User xuelei
> +# Date 1270861992 -28800
> +# Node ID 89f4ec9e4b33f239c875531c07f326992ac5159d
> +# Parent 710c4493902f39c88d6c99c3a9c3e7a57e50f100
> +6941936: Broken pipe error of test case DNSIdentities.java
> +Reviewed-by: chegar
> +
> +diff -r 710c4493902f -r 89f4ec9e4b33 test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/DNSIdentities.java
> +--- openjdk-old/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/DNSIdentities.java Fri Apr 09 07:21:46 2010 -0700
> ++++ openjdk/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/DNSIdentities.java Sat Apr 10 09:13:12 2010 +0800
> +@@ -624,6 +624,11 @@
> + volatile static boolean serverReady = false;
> +
> + /*
> ++ * Is the connection ready to close?
> ++ */
> ++ volatile static boolean closeReady = false;
> ++
> ++ /*
> + * Turn on SSL debugging?
> + */
> + static boolean debug = false;
> +@@ -670,11 +675,14 @@
> + out.print("Testing\r\n");
> + out.flush();
> + } finally {
> +- // close the socket
> +- Thread.sleep(2000);
> +- System.out.println("Server closing socket");
> +- sslSocket.close();
> +- serverReady = false;
> ++ // close the socket
> ++ while (!closeReady) {
> ++ Thread.sleep(50);
> ++ }
> ++
> ++ System.out.println("Server closing socket");
> ++ sslSocket.close();
> ++ serverReady = false;
> + }
> +
> + }
> +@@ -704,12 +712,17 @@
> + URL url = new URL("https://localhost:" + serverPort+"/");
> + System.out.println("url is "+url.toString());
> +
> +- http = (HttpsURLConnection)url.openConnection();
> ++ try {
> ++ http = (HttpsURLConnection)url.openConnection();
> +
> +- int respCode = http.getResponseCode();
> +- System.out.println("respCode = "+respCode);
> +-
> +- http.disconnect();
> ++ int respCode = http.getResponseCode();
> ++ System.out.println("respCode = "+respCode);
> ++ } finally {
> ++ if (http != null) {
> ++ http.disconnect();
> ++ }
> ++ closeReady = true;
> ++ }
> + }
> +
> + /*
> +diff -r 710c4493902f -r 89f4ec9e4b33 test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/HttpsPost.java
> +--- openjdk-old/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/HttpsPost.java Fri Apr 09 07:21:46 2010 -0700
> ++++ openjdk/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/HttpsPost.java Sat Apr 10 09:13:12 2010 +0800
> +@@ -61,6 +61,11 @@
> + volatile static boolean serverReady = false;
> +
> + /*
> ++ * Is the connection ready to close?
> ++ */
> ++ volatile static boolean closeReady = false;
> ++
> ++ /*
> + * Turn on SSL debugging?
> + */
> + static boolean debug = false;
> +@@ -98,25 +103,34 @@
> + serverReady = true;
> +
> + SSLSocket sslSocket = (SSLSocket) sslServerSocket.accept();
> +- InputStream sslIS = sslSocket.getInputStream();
> +- OutputStream sslOS = sslSocket.getOutputStream();
> +- BufferedReader br = new BufferedReader(new InputStreamReader(sslIS));
> +- PrintStream ps = new PrintStream(sslOS);
> +- // process HTTP POST request from client
> +- System.out.println("status line: "+br.readLine());
> +- String msg = null;
> +- while ((msg = br.readLine()) != null && msg.length() > 0);
> ++ try {
> ++ InputStream sslIS = sslSocket.getInputStream();
> ++ OutputStream sslOS = sslSocket.getOutputStream();
> ++ BufferedReader br =
> ++ new BufferedReader(new InputStreamReader(sslIS));
> ++ PrintStream ps = new PrintStream(sslOS);
> +
> +- msg = br.readLine();
> +- if (msg.equals(postMsg)) {
> +- ps.println("HTTP/1.1 200 OK\n\n");
> +- } else {
> +- ps.println("HTTP/1.1 500 Not OK\n\n");
> ++ // process HTTP POST request from client
> ++ System.out.println("status line: "+br.readLine());
> ++ String msg = null;
> ++ while ((msg = br.readLine()) != null && msg.length() > 0);
> ++
> ++ msg = br.readLine();
> ++ if (msg.equals(postMsg)) {
> ++ ps.println("HTTP/1.1 200 OK\n\n");
> ++ } else {
> ++ ps.println("HTTP/1.1 500 Not OK\n\n");
> ++ }
> ++ ps.flush();
> ++
> ++ // close the socket
> ++ while (!closeReady) {
> ++ Thread.sleep(50);
> ++ }
> ++ } finally {
> ++ sslSocket.close();
> ++ sslServerSocket.close();
> + }
> +- ps.flush();
> +- Thread.sleep(2000);
> +- sslSocket.close();
> +- sslServerSocket.close();
> + }
> +
> + /*
> +@@ -144,12 +158,17 @@
> +
> + http.setRequestMethod("POST");
> + PrintStream ps = new PrintStream(http.getOutputStream());
> +- ps.println(postMsg);
> +- ps.flush();
> +- if (http.getResponseCode() != 200) {
> +- throw new RuntimeException("test Failed");
> ++ try {
> ++ ps.println(postMsg);
> ++ ps.flush();
> ++ if (http.getResponseCode() != 200) {
> ++ throw new RuntimeException("test Failed");
> ++ }
> ++ } finally {
> ++ ps.close();
> ++ http.disconnect();
> ++ closeReady = true;
> + }
> +- ps.close();
> + }
> +
> + static class NameVerifier implements HostnameVerifier {
> +diff -r 710c4493902f -r 89f4ec9e4b33 test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPAddressDNSIdentities.java
> +--- openjdk-old/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPAddressDNSIdentities.java Fri Apr 09 07:21:46 2010 -0700
> ++++ openjdk/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPAddressDNSIdentities.java Sat Apr 10 09:13:12 2010 +0800
> +@@ -624,6 +624,11 @@
> + volatile static boolean serverReady = false;
> +
> + /*
> ++ * Is the connection ready to close?
> ++ */
> ++ volatile static boolean closeReady = false;
> ++
> ++ /*
> + * Turn on SSL debugging?
> + */
> + static boolean debug = false;
> +@@ -670,11 +675,14 @@
> + out.print("Testing\r\n");
> + out.flush();
> + } finally {
> +- // close the socket
> +- Thread.sleep(2000);
> +- System.out.println("Server closing socket");
> +- sslSocket.close();
> +- serverReady = false;
> ++ // close the socket
> ++ while (!closeReady) {
> ++ Thread.sleep(50);
> ++ }
> ++
> ++ System.out.println("Server closing socket");
> ++ sslSocket.close();
> ++ serverReady = false;
> + }
> +
> + }
> +@@ -716,7 +724,10 @@
> + // no subject alternative names matching IP address 127.0.0.1 found
> + // that's the expected exception, ignore it.
> + } finally {
> +- http.disconnect();
> ++ if (http != null) {
> ++ http.disconnect();
> ++ }
> ++ closeReady = true;
> + }
> + }
> +
> +diff -r 710c4493902f -r 89f4ec9e4b33 test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPAddressIPIdentities.java
> +--- openjdk-old/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPAddressIPIdentities.java Fri Apr 09 07:21:46 2010 -0700
> ++++ openjdk/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPAddressIPIdentities.java Sat Apr 10 09:13:12 2010 +0800
> +@@ -625,6 +625,11 @@
> + volatile static boolean serverReady = false;
> +
> + /*
> ++ * Is the connection ready to close?
> ++ */
> ++ volatile static boolean closeReady = false;
> ++
> ++ /*
> + * Turn on SSL debugging?
> + */
> + static boolean debug = false;
> +@@ -672,7 +677,10 @@
> + out.flush();
> + } finally {
> + // close the socket
> +- Thread.sleep(2000);
> ++ while (!closeReady) {
> ++ Thread.sleep(50);
> ++ }
> ++
> + System.out.println("Server closing socket");
> + sslSocket.close();
> + serverReady = false;
> +@@ -705,12 +713,17 @@
> + URL url = new URL("https://127.0.0.1:" + serverPort+"/");
> + System.out.println("url is "+url.toString());
> +
> +- http = (HttpsURLConnection)url.openConnection();
> ++ try {
> ++ http = (HttpsURLConnection)url.openConnection();
> +
> +- int respCode = http.getResponseCode();
> +- System.out.println("respCode = "+respCode);
> +-
> +- http.disconnect();
> ++ int respCode = http.getResponseCode();
> ++ System.out.println("respCode = "+respCode);
> ++ } finally {
> ++ if (http != null) {
> ++ http.disconnect();
> ++ }
> ++ closeReady = true;
> ++ }
> + }
> +
> + /*
> +diff -r 710c4493902f -r 89f4ec9e4b33 test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPIdentities.java
> +--- openjdk-old/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPIdentities.java Fri Apr 09 07:21:46 2010 -0700
> ++++ openjdk/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPIdentities.java Sat Apr 10 09:13:12 2010 +0800
> +@@ -625,6 +625,11 @@
> + volatile static boolean serverReady = false;
> +
> + /*
> ++ * Is the connection ready to close?
> ++ */
> ++ volatile static boolean closeReady = false;
> ++
> ++ /*
> + * Turn on SSL debugging?
> + */
> + static boolean debug = false;
> +@@ -672,7 +677,10 @@
> + out.flush();
> + } finally {
> + // close the socket
> +- Thread.sleep(2000);
> ++ while (!closeReady) {
> ++ Thread.sleep(50);
> ++ }
> ++
> + System.out.println("Server closing socket");
> + sslSocket.close();
> + serverReady = false;
> +@@ -705,12 +713,17 @@
> + URL url = new URL("https://localhost:" + serverPort+"/");
> + System.out.println("url is "+url.toString());
> +
> +- http = (HttpsURLConnection)url.openConnection();
> ++ try {
> ++ http = (HttpsURLConnection)url.openConnection();
> +
> +- int respCode = http.getResponseCode();
> +- System.out.println("respCode = "+respCode);
> +-
> +- http.disconnect();
> ++ int respCode = http.getResponseCode();
> ++ System.out.println("respCode = "+respCode);
> ++ } finally {
> ++ if (http != null) {
> ++ http.disconnect();
> ++ }
> ++ closeReady = true;
> ++ }
> + }
> +
> + /*
> +diff -r 710c4493902f -r 89f4ec9e4b33 test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/Identities.java
> +--- openjdk-old/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/Identities.java Fri Apr 09 07:21:46 2010 -0700
> ++++ openjdk/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/Identities.java Sat Apr 10 09:13:12 2010 +0800
> +@@ -624,6 +624,11 @@
> + volatile static boolean serverReady = false;
> +
> + /*
> ++ * Is the connection ready to close?
> ++ */
> ++ volatile static boolean closeReady = false;
> ++
> ++ /*
> + * Turn on SSL debugging?
> + */
> + static boolean debug = false;
> +@@ -671,7 +676,10 @@
> + out.flush();
> + } finally {
> + // close the socket
> +- Thread.sleep(2000);
> ++ while (!closeReady) {
> ++ Thread.sleep(50);
> ++ }
> ++
> + System.out.println("Server closing socket");
> + sslSocket.close();
> + serverReady = false;
> +@@ -704,12 +712,17 @@
> + URL url = new URL("https://localhost:" + serverPort+"/");
> + System.out.println("url is "+url.toString());
> +
> +- http = (HttpsURLConnection)url.openConnection();
> ++ try {
> ++ http = (HttpsURLConnection)url.openConnection();
> +
> +- int respCode = http.getResponseCode();
> +- System.out.println("respCode = "+respCode);
> +-
> +- http.disconnect();
> ++ int respCode = http.getResponseCode();
> ++ System.out.println("respCode = "+respCode);
> ++ } finally {
> ++ if (http != null) {
> ++ http.disconnect();
> ++ }
> ++ closeReady = true;
> ++ }
> + }
> +
> + /*
> +diff -r 710c4493902f -r 89f4ec9e4b33 test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/Redirect.java
> +--- openjdk-old/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/Redirect.java Fri Apr 09 07:21:46 2010 -0700
> ++++ openjdk/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/Redirect.java Sat Apr 10 09:13:12 2010 +0800
> +@@ -61,6 +61,11 @@
> + volatile static boolean serverReady = false;
> +
> + /*
> ++ * Is the connection ready to close?
> ++ */
> ++ volatile static boolean closeReady = false;
> ++
> ++ /*
> + * Turn on SSL debugging?
> + */
> + static boolean debug = false;
> +@@ -98,24 +103,33 @@
> + serverReady = true;
> +
> + SSLSocket sslSocket = (SSLSocket) sslServerSocket.accept();
> +- InputStream sslIS = sslSocket.getInputStream();
> +- OutputStream sslOS = sslSocket.getOutputStream();
> +- BufferedReader br = new BufferedReader(new InputStreamReader(sslIS));
> +- PrintStream ps = new PrintStream(sslOS);
> +- // process HTTP POST request from client
> +- System.out.println("status line: "+br.readLine());
> ++ try {
> ++ InputStream sslIS = sslSocket.getInputStream();
> ++ OutputStream sslOS = sslSocket.getOutputStream();
> ++ BufferedReader br =
> ++ new BufferedReader(new InputStreamReader(sslIS));
> ++ PrintStream ps = new PrintStream(sslOS);
> +
> +- ps.println("HTTP/1.1 307 Redirect");
> +- ps.println("Location: https://localhost:"+serverPort+"/index.html\n\n");
> +- ps.flush();
> +- sslSocket = (SSLSocket) sslServerSocket.accept();
> +- sslOS = sslSocket.getOutputStream();
> +- ps = new PrintStream(sslOS);
> +- ps.println("HTTP/1.1 200 Redirect succeeded\n\n");
> +- ps.flush();
> +- Thread.sleep(2000);
> +- sslSocket.close();
> +- sslServerSocket.close();
> ++ // process HTTP POST request from client
> ++ System.out.println("status line: "+br.readLine());
> ++
> ++ ps.println("HTTP/1.1 307 Redirect");
> ++ ps.println("Location: https://localhost:" + serverPort +
> ++ "/index.html\n\n");
> ++ ps.flush();
> ++ sslSocket = (SSLSocket) sslServerSocket.accept();
> ++ sslOS = sslSocket.getOutputStream();
> ++ ps = new PrintStream(sslOS);
> ++ ps.println("HTTP/1.1 200 Redirect succeeded\n\n");
> ++ ps.flush();
> ++ } finally {
> ++ // close the socket
> ++ while (!closeReady) {
> ++ Thread.sleep(50);
> ++ }
> ++ sslSocket.close();
> ++ sslServerSocket.close();
> ++ }
> + }
> +
> + /*
> +@@ -139,10 +153,14 @@
> + HttpsURLConnection.setDefaultHostnameVerifier(
> + new NameVerifier());
> + HttpsURLConnection http = (HttpsURLConnection)url.openConnection();
> +-
> +- System.out.println("response header: "+http.getHeaderField(0));
> +- if (http.getResponseCode() != 200) {
> +- throw new RuntimeException("test Failed");
> ++ try {
> ++ System.out.println("response header: "+http.getHeaderField(0));
> ++ if (http.getResponseCode() != 200) {
> ++ throw new RuntimeException("test Failed");
> ++ }
> ++ } finally {
> ++ http.disconnect();
> ++ closeReady = true;
> + }
> + }
> +
> diff -r 531713add335 -r 091a6344bf04 patches/openjdk/6943219-failure-in-linux.patch
> --- /dev/null Thu Jan 01 00:00:00 1970 +0000
> +++ b/patches/openjdk/6943219-failure-in-linux.patch Mon Dec 06 18:26:54 2010 +0100
> @@ -0,0 +1,73 @@
> +# HG changeset patch
> +# User chegar
> +# Date 1271345836 -3600
> +# Node ID ed61accf772ed2eb2002f6100f3aa945ef05431b
> +# Parent 1672f0212f025441f1ad058b72568c992a0c6e16
> +6943219: test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/DNSIdentities.java fail in linux
> +Reviewed-by: andrew
> +
> +diff -r 1672f0212f02 -r ed61accf772e test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/DNSIdentities.java
> +--- openjdk-old/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/DNSIdentities.java Tue Apr 13 12:02:06 2010 +0100
> ++++ openjdk/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/DNSIdentities.java Thu Apr 15 16:37:16 2010 +0100
> +@@ -657,9 +657,6 @@
> +
> + SSLSocket sslSocket = (SSLSocket) sslServerSocket.accept();
> + sslSocket.setNeedClientAuth(true);
> +- if (sslSocket instanceof SSLSocketImpl) {
> +- ((SSLSocketImpl)sslSocket).trySetHostnameVerification("HTTPS");
> +- }
> +
> + PrintStream out =
> + new PrintStream(sslSocket.getOutputStream());
> +diff -r 1672f0212f02 -r ed61accf772e test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPAddressDNSIdentities.java
> +--- openjdk-old/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPAddressDNSIdentities.java Tue Apr 13 12:02:06 2010 +0100
> ++++ openjdk/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPAddressDNSIdentities.java Thu Apr 15 16:37:16 2010 +0100
> +@@ -657,9 +657,6 @@
> +
> + SSLSocket sslSocket = (SSLSocket) sslServerSocket.accept();
> + sslSocket.setNeedClientAuth(true);
> +- if (sslSocket instanceof SSLSocketImpl) {
> +- ((SSLSocketImpl)sslSocket).trySetHostnameVerification("HTTPS");
> +- }
> +
> + PrintStream out =
> + new PrintStream(sslSocket.getOutputStream());
> +diff -r 1672f0212f02 -r ed61accf772e test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPAddressIPIdentities.java
> +--- openjdk-old/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPAddressIPIdentities.java Tue Apr 13 12:02:06 2010 +0100
> ++++ openjdk/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPAddressIPIdentities.java Thu Apr 15 16:37:16 2010 +0100
> +@@ -658,9 +658,6 @@
> +
> + SSLSocket sslSocket = (SSLSocket) sslServerSocket.accept();
> + sslSocket.setNeedClientAuth(true);
> +- if (sslSocket instanceof SSLSocketImpl) {
> +- ((SSLSocketImpl)sslSocket).trySetHostnameVerification("HTTPS");
> +- }
> +
> + PrintStream out =
> + new PrintStream(sslSocket.getOutputStream());
> +diff -r 1672f0212f02 -r ed61accf772e test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPIdentities.java
> +--- openjdk-old/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPIdentities.java Tue Apr 13 12:02:06 2010 +0100
> ++++ openjdk/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/IPIdentities.java Thu Apr 15 16:37:16 2010 +0100
> +@@ -658,9 +658,6 @@
> +
> + SSLSocket sslSocket = (SSLSocket) sslServerSocket.accept();
> + sslSocket.setNeedClientAuth(true);
> +- if (sslSocket instanceof SSLSocketImpl) {
> +- ((SSLSocketImpl)sslSocket).trySetHostnameVerification("HTTPS");
> +- }
> +
> + PrintStream out =
> + new PrintStream(sslSocket.getOutputStream());
> +diff -r 1672f0212f02 -r ed61accf772e test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/Identities.java
> +--- openjdk-old/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/Identities.java Tue Apr 13 12:02:06 2010 +0100
> ++++ openjdk/jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/Identities.java Thu Apr 15 16:37:16 2010 +0100
> +@@ -657,9 +657,6 @@
> +
> + SSLSocket sslSocket = (SSLSocket) sslServerSocket.accept();
> + sslSocket.setNeedClientAuth(true);
> +- if (sslSocket instanceof SSLSocketImpl) {
> +- ((SSLSocketImpl)sslSocket).trySetHostnameVerification("HTTPS");
> +- }
> +
> + PrintStream out =
> + new PrintStream(sslSocket.getOutputStream());
--
Andrew :)
Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
Support Free Java!
Contribute to GNU Classpath and IcedTea
http://www.gnu.org/software/classpath
http://icedtea.classpath.org
PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint = F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8
More information about the distro-pkg-dev
mailing list