@@ -0,0 +1,2318 @@
+package org.bouncycastle.jsse.util;%0A%0Aimport java.io.IOException;%0Aimport java.io.InputStream;%0Aimport java.net.InetAddress;%0Aimport java.net.Socket;%0Aimport java.net.UnknownHostException;%0A%0Aimport javax.net.ssl.SSLSocketFactory;%0A%0Apublic class CustomSSLSocketFactory extends SSLSocketFactory%0A%7B%0A    protected final SSLSocketFactory delegate;%0A%0A    public CustomSSLSocketFactory(SSLSocketFactory delegate)%0A    %7B%0A        if (null == delegate)%0A        %7B%0A            throw new NullPointerException(%22'delegate' cannot be null%22);%0A        %7D%0A%0A        this.delegate = delegate;%0A    %7D%0A%0A    @Override%0A    public Socket createSocket() throws IOException%0A    %7B%0A        return configureSocket(delegate.createSocket());%0A    %7D%0A%0A    @Override%0A    public Socket createSocket(InetAddress host, int port) throws IOException%0A    %7B%0A        return configureSocket(delegate.createSocket(host, port));%0A    %7D%0A%0A    @Override%0A    public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort)%0A        throws IOException%0A    %7B%0A        return configureSocket(delegate.createSocket(address, port, localAddress, localPort));%0A    %7D%0A%0A    @Override%0A    public Socket createSocket(String host, int port) throws IOException, UnknownHostException%0A    %7B%0A        return configureSocket(delegate.createSocket(host, port));%0A    %7D%0A%0A    @Override%0A    public Socket createSocket(String host, int port, InetAddress localHost, int localPort)%0A        throws IOException, UnknownHostException%0A    %7B%0A        return configureSocket(delegate.createSocket(host, port, localHost, localPort));%0A    %7D%0A%0A    @Override%0A    public Socket createSocket(Socket s, InputStream consumed, boolean autoClose) throws IOException%0A    %7B%0A        return configureSocket(delegate.createSocket(s, consumed, autoClose));%0A    %7D%0A%0A    @Override%0A    public Socket createSocket(Socket s, String host, int port, boolean autoClose) throws IOException%0A    %7B%0A        return configureSocket(delegate.createSocket(s, host, port, autoClose));%0A    %7D%0A%0A    @Override%0A    public String%5B%5D getDefaultCipherSuites()%0A    %7B%0A        return delegate.getDefaultCipherSuites();%0A    %7D%0A%0A    @Override%0A    public String%5B%5D getSupportedCipherSuites()%0A    %7B%0A        return delegate.getSupportedCipherSuites();%0A    %7D%0A%0A    protected Socket configureSocket(Socket s)%0A    %7B%0A        return s;%0A    %7D%0A%7D%0A

Add CustomSSLSocketFactory utility class