I know Android uses Apache Harmony for a lot of things, including SSLEngine, but since I was their decision, I consider it to be an issue in Android.

Found this SSLEngine test case inside Android source tree:

http://www.netmite.com/android/mydroid/donut/dalvik/libcore/x-net/src/test/java/tests/api/javax/net/ssl/SSLEngineTest.java

It has this comment:

@KnownFailure("Handshake Status is never finished. NPE in "
+ "ClientSessionContext$HostAndPort.hashCode() when host is null")

So I guess it just didn't make the shortlist for Donut / Eclair bug fixing.


Trying to use SSL instead of TLS doesn't seem to work.

SSLContext.getInstance("SSL") or SSLContext.getInstance("SSLv3") both fail, throwing exceptions to indicate unsupported security protocol.


SSLEngine is a pain to work with, and hitting this bug after making it mostly work is really unpleasant.


I'll have to look for a workaround, will post here if I find one.

-- Kostya

06.08.2010 4:34, Indicator Veritatis пишет:
This bug is not coming from Android code. It is either coming from
Apache or from Ubuntu (look for the first exception in the stack at
your link).

Since only the first reported NPE is reported as fixed in Froyo, but
the "Bad address" is not, my guess is that despite the problems you
mention, you are better off using SSL instead of TLS. That works.

On Aug 5, 10:49 am, Kostya Vasilyev<kmans...@gmail.com>  wrote:
Hello,

I am implementing some NIO based code with SSL support, using SSLEngine.

Working nicely along, I ran into a NullPointerException inside SSLEngine
during SSL handshaking.

This bug is described here:

http://code.google.com/p/android/issues/detail?id=4914

and is reported as fixed in Froyo.

However, I'm building my app for the devices that are out there,
starting with 1.5.

Would anyone have any suggestions for working around this bug, instead
of limiting the app to Froyo and greater?

It's certainly possible to use SSLSocket, but they don't support
non-blocking operation, and so I'd rather not go down that route.

--
Kostya Vasilev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com


--
Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to