Use javax.net.ssl.SSLEngine for NIO

Marco Trudel marco@mtsystems.ch
Wed Dec 19 06:56:00 GMT 2007


Jary Grove wrote:
> I have created a new bug for the Clone not supported (Null pointer) exception(http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34521). 
> 
> I tried with the latest snapshot (Dec 14) and got the same exception - clone not supported. 

Well, the clone one might be a harder one to fix yourself but at least 
the exception looks, according to Casey (getChannel should return null 
instead of throwing an exception), like you could fix it yourself.
If you're building from the latest revision, why don't you just try your 
luck?


Marco

> Please let me know when these bugs are fixed and I will test.
> 
> Regards
> Jary
> 
> 
> ----- Original Message ----
>> From: Casey Marshall <casey.s.marshall@gmail.com>
>> To: David Daney <ddaney@avtrex.com>
>> Cc: Jary Grove <jarygrove@yahoo.com>; java@gcc.gnu.org
>> Sent: Monday, December 17, 2007 5:38:02 PM
>> Subject: Re: Use javax.net.ssl.SSLEngine for NIO
>>
>> On Dec 17, 2007 3:14 PM, David Daney 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.
>>
>>>> 2)
>>>> java.lang.CloneNotSupportedException
>>>> at java.lang.Object.clone
>>>> at gnu.javax.net.ssl.provider.SSLEngineImpl.setEnabledProtocols
>>>>
>> This makes zero sense; that method is cloning a String[], which ought
>> to be
>> cloneable.
>>
> 
> 
>       ____________________________________________________________________________________
> Be a better friend, newshound, and 
> know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 
> 
> 



More information about the Java mailing list