JSSE Provider - SSL tunneling

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

JSSE Provider - SSL tunneling

thowim
This post has NOT been accepted by the mailing list yet.
Hy everybody,

I'm using the latest JSSE provider (bctls-jdk15on-157) in an Android project.

This project needs to support tunneling SSL through a proxy.

According to the source of the latest beta (bctls-jdk15on-158b07) this functionality is not supported yet (org.bouncycastle.jsse.provider.ProvSSLSocketFactory):

public Socket createSocket(Socket s, InputStream consumed, boolean autoClose) throws IOException
    {
        /*
         * TODO[jsse] "Creates a server mode Socket layered over an existing connected socket,
         * and is able to read data which has already been consumed/removed from the Socket's
         * underlying InputStream."
         */
        throw new UnsupportedOperationException();
    }


Is this feature on the current roadmap ?

Best regards
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: JSSE Provider - SSL tunneling

thowim
This post has NOT been accepted by the mailing list yet.
UPDATE:
The method mentioned was the wrong one.
Bouncy Castle supports this feature in the latest beta(bctls-jdk15on-158b07):
org.bouncycastle.jsse.provider.ProvSSLSocketFactory
Version 1.57:
@Override
    public Socket createSocket(Socket s, String host, int port, boolean autoClose) throws IOException
    {
        /*
         * TODO[jsse]
         * "Returns a socket layered over an existing socket connected to the named host, at the given port."
         */
        throw new UnsupportedOperationException();
    }
Version 1.58 Beta 7:
@Override
    public Socket createSocket(Socket s, String host, int port, boolean autoClose) throws IOException
    {
        return new ProvSSLSocketWrap(context, context.createContextData(), s, host, port, autoClose);
    }

Works like a charm
Loading...