HTTPCLIENT-1726: Copy the SNI fix from SSLConnectionSocketFactory to the deprecated SSLSocketFactory class.
Signed-off-by: David Black <dblack@atlassian.com> git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/branches/4.5.x@1733362 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5a60e7f948
commit
7663e6a596
|
@ -39,6 +39,7 @@ import java.security.NoSuchAlgorithmException;
|
|||
import java.security.SecureRandom;
|
||||
import java.security.UnrecoverableKeyException;
|
||||
|
||||
import javax.net.SocketFactory;
|
||||
import javax.net.ssl.SSLContext;
|
||||
import javax.net.ssl.SSLSocket;
|
||||
|
||||
|
@ -519,9 +520,7 @@ public class SSLSocketFactory implements LayeredConnectionSocketFactory, SchemeL
|
|||
|
||||
@Override
|
||||
public Socket createSocket(final HttpContext context) throws IOException {
|
||||
final SSLSocket sock = (SSLSocket) this.socketfactory.createSocket();
|
||||
internalPrepareSocket(sock);
|
||||
return sock;
|
||||
return SocketFactory.getDefault().createSocket();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue