Use javax.net.ssl.SSLEngine for NIO
Andrew Haley
aph@redhat.com
Tue Dec 18 10:07:00 GMT 2007
Casey Marshall writes:
> On Dec 17, 2007 3:14 PM, David Daney <ddaney@avtrex.com> wrote:
> > Perhaps Casey could opine...
> >
> > Jary Grove wrote:
> > > Just trying to create a plain socket connection using SSL and getting the exception telling me to use NIO.
> > > I google it and found that a bug was created --- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34313
> > >
> > > Is there anybody? who has successfully implemented SSL using SSLSocket or SSLEngine with GCJ 4.3 (Jessie)?
> > >
> > > It look like that new api is completely unusable - I tried using SSL Engine got the null pointer exception, tried with SSL Socket - was told by the exception to use SSL Engine --
> > >
> > > By the way the code I am testing with works with Java5 -- both with SSLSocket and SSLEngine.
> > >
> > > Exceptions:
> > > 1)
> > > java.lang.UnsupportedOperationException: use javax.net.ssl.SSLEngine for NIO
> > > caused by java.lang.UnsupportedOperationException: use javax.net.ssl.SSLEngine
> > > for NIO
> > >
>
> I noted a fix for this in the bug. getChannel should return null
> instead of throwing an exception to match the JDK's behavior.
OK, so all we need is someone to commit that change. A test case
would be nice.
Andrew.
--
Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, UK
Registered in England and Wales No. 3798903
More information about the Java
mailing list