From 3269410866bf65da6c416827851a6ee3b57416d4 Mon Sep 17 00:00:00 2001 From: Oleg Kalnichevski Date: Thu, 19 Jun 2014 09:17:53 +0000 Subject: [PATCH] Makes no sense to me but hope it will make VMWare happy git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1603773 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/http/conn/ssl/TestSSLSocketFactory.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/httpclient/src/test/java/org/apache/http/conn/ssl/TestSSLSocketFactory.java b/httpclient/src/test/java/org/apache/http/conn/ssl/TestSSLSocketFactory.java index 193e634ff..83800ad32 100644 --- a/httpclient/src/test/java/org/apache/http/conn/ssl/TestSSLSocketFactory.java +++ b/httpclient/src/test/java/org/apache/http/conn/ssl/TestSSLSocketFactory.java @@ -108,7 +108,7 @@ public void testBasicSSL() throws Exception { final SSLConnectionSocketFactory socketFactory = new SSLConnectionSocketFactory( SSLTestContexts.createClientSSLContext(), hostVerifier); final Socket socket = socketFactory.createSocket(context); - final InetSocketAddress remoteAddress = new InetSocketAddress(this.server.getInetAddress(), this.server.getLocalPort()); + final InetSocketAddress remoteAddress = new InetSocketAddress("localhost", this.server.getLocalPort()); final HttpHost target = new HttpHost("localhost", this.server.getLocalPort(), "https"); final SSLSocket sslSocket = (SSLSocket) socketFactory.connectSocket(0, socket, target, remoteAddress, null, context); try { @@ -134,7 +134,7 @@ public void testClientAuthSSL() throws Exception { final SSLConnectionSocketFactory socketFactory = new SSLConnectionSocketFactory( SSLTestContexts.createClientSSLContext(), hostVerifier); final Socket socket = socketFactory.createSocket(context); - final InetSocketAddress remoteAddress = new InetSocketAddress(this.server.getInetAddress(), this.server.getLocalPort()); + final InetSocketAddress remoteAddress = new InetSocketAddress("localhost", this.server.getLocalPort()); final HttpHost target = new HttpHost("localhost", this.server.getLocalPort(), "https"); final SSLSocket sslSocket = (SSLSocket) socketFactory.connectSocket(0, socket, target, remoteAddress, null, context); try { @@ -161,7 +161,7 @@ public void testClientAuthSSLFailure() throws Exception { final SSLConnectionSocketFactory socketFactory = new SSLConnectionSocketFactory( SSLTestContexts.createClientSSLContext(), hostVerifier); final Socket socket = socketFactory.createSocket(context); - final InetSocketAddress remoteAddress = new InetSocketAddress(this.server.getInetAddress(), this.server.getLocalPort()); + final InetSocketAddress remoteAddress = new InetSocketAddress("localhost", this.server.getLocalPort()); final HttpHost target = new HttpHost("localhost", this.server.getLocalPort(), "https"); final SSLSocket sslSocket = (SSLSocket) socketFactory.connectSocket(0, socket, target, remoteAddress, null, context); try { @@ -200,7 +200,7 @@ public String chooseAlias( final SSLConnectionSocketFactory socketFactory = new SSLConnectionSocketFactory( SSLTestContexts.createClientSSLContext(), hostVerifier); final Socket socket = socketFactory.createSocket(context); - final InetSocketAddress remoteAddress = new InetSocketAddress(this.server.getInetAddress(), this.server.getLocalPort()); + final InetSocketAddress remoteAddress = new InetSocketAddress("localhost", this.server.getLocalPort()); final HttpHost target = new HttpHost("localhost", this.server.getLocalPort(), "https"); final SSLSocket sslSocket = (SSLSocket) socketFactory.connectSocket(0, socket, target, remoteAddress, null, context); try { @@ -229,7 +229,7 @@ public void testSSLTrustVerification() throws Exception { SSLConnectionSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER); final Socket socket = socketFactory.createSocket(context); - final InetSocketAddress remoteAddress = new InetSocketAddress(this.server.getInetAddress(), this.server.getLocalPort()); + final InetSocketAddress remoteAddress = new InetSocketAddress("localhost", this.server.getLocalPort()); final HttpHost target = new HttpHost("localhost", this.server.getLocalPort(), "https"); final SSLSocket sslSocket = (SSLSocket) socketFactory.connectSocket(0, socket, target, remoteAddress, null, context); sslSocket.close(); @@ -262,7 +262,7 @@ public boolean isTrusted( SSLConnectionSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER); final Socket socket = socketFactory.createSocket(context); - final InetSocketAddress remoteAddress = new InetSocketAddress(this.server.getInetAddress(), this.server.getLocalPort()); + final InetSocketAddress remoteAddress = new InetSocketAddress("localhost", this.server.getLocalPort()); final HttpHost target = new HttpHost("localhost", this.server.getLocalPort(), "https"); final SSLSocket sslSocket = (SSLSocket) socketFactory.connectSocket(0, socket, target, remoteAddress, null, context); sslSocket.close();