Commit 1c23733c by Tom Tromey Committed by Tom Tromey

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=236614

	* gnu/javax/net/ssl/provider/SSLSocketFactoryImpl.java
	(createSocket): Change order of delegation.

From-SVN: r123889
parent bdede2ac
2007-04-16 Tom Tromey <tromey@redhat.com>
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=236614
* gnu/javax/net/ssl/provider/SSLSocketFactoryImpl.java
(createSocket): Change order of delegation.
2007-04-16 Andrew Haley <aph@redhat.com> 2007-04-16 Andrew Haley <aph@redhat.com>
* java/io/ObjectInputStream.java: (parseContent): Call (String, * java/io/ObjectInputStream.java: (parseContent): Call (String,
/* SSLSocketFactoryImpl.java -- /* SSLSocketFactoryImpl.java --
Copyright (C) 2006 Free Software Foundation, Inc. Copyright (C) 2006, 2007 Free Software Foundation, Inc.
This file is a part of GNU Classpath. This file is a part of GNU Classpath.
...@@ -93,10 +93,7 @@ public class SSLSocketFactoryImpl extends SSLSocketFactory ...@@ -93,10 +93,7 @@ public class SSLSocketFactoryImpl extends SSLSocketFactory
@Override public SSLSocketImpl createSocket(String host, int port) @Override public SSLSocketImpl createSocket(String host, int port)
throws IOException, UnknownHostException throws IOException, UnknownHostException
{ {
SSLSocketImpl socket = new SSLSocketImpl(contextImpl, host, port); return createSocket(host, port, null, 0);
InetSocketAddress endpoint = new InetSocketAddress(host, port);
socket.connect(endpoint);
return socket;
} }
/* (non-Javadoc) /* (non-Javadoc)
...@@ -106,8 +103,10 @@ public class SSLSocketFactoryImpl extends SSLSocketFactory ...@@ -106,8 +103,10 @@ public class SSLSocketFactoryImpl extends SSLSocketFactory
InetAddress localHost, int localPort) InetAddress localHost, int localPort)
throws IOException, UnknownHostException throws IOException, UnknownHostException
{ {
SSLSocketImpl socket = createSocket(host, port); SSLSocketImpl socket = new SSLSocketImpl(contextImpl, host, port);
InetSocketAddress endpoint = new InetSocketAddress(host, port);
socket.bind(new InetSocketAddress(localHost, localPort)); socket.bind(new InetSocketAddress(localHost, localPort));
socket.connect(endpoint);
return socket; return socket;
} }
...@@ -117,10 +116,7 @@ public class SSLSocketFactoryImpl extends SSLSocketFactory ...@@ -117,10 +116,7 @@ public class SSLSocketFactoryImpl extends SSLSocketFactory
@Override public SSLSocketImpl createSocket(InetAddress host, int port) @Override public SSLSocketImpl createSocket(InetAddress host, int port)
throws IOException throws IOException
{ {
SSLSocketImpl socket = new SSLSocketImpl(contextImpl, return createSocket(host, port, null, 0);
host.getCanonicalHostName(), port);
socket.connect(new InetSocketAddress(host, port));
return socket;
} }
/* (non-Javadoc) /* (non-Javadoc)
...@@ -130,8 +126,10 @@ public class SSLSocketFactoryImpl extends SSLSocketFactory ...@@ -130,8 +126,10 @@ public class SSLSocketFactoryImpl extends SSLSocketFactory
InetAddress localHost, int localPort) InetAddress localHost, int localPort)
throws IOException throws IOException
{ {
SSLSocketImpl socket = createSocket(host, port); SSLSocketImpl socket = new SSLSocketImpl(contextImpl,
host.getCanonicalHostName(), port);
socket.bind(new InetSocketAddress(localHost, localPort)); socket.bind(new InetSocketAddress(localHost, localPort));
socket.connect(new InetSocketAddress(host, port));
return socket; return socket;
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment