Skip to content

Android(< 3.0) SSLEngine Bug 12955 workaround? #155

Open
Davidiusdadi opened this Issue Feb 5, 2013 · 4 comments

3 participants

@Davidiusdadi
Collaborator

Moved form pull #153:
@2fours:
There seem to be problems on older android platforms because of this bug in SSLEngine : https://code.google.com/p/android/issues/detail?id=12955#c12. It appears that the only way this will work on these platforms is to abandon SSLEngine and use SSLSocket. Any chance of that happening?


@Davidiusdadi
Do you mean that your code is working fine but there is a problem with what i merged?

If there is a general problem i would like to know the exact exception or build error message and the android version you are working on.

The solution suggested in #141 might solve the problem.

@Davidiusdadi
Collaborator

Since this library heavily depends on the use of channels there is currently no way around the SSLEngine.

The only workaround would be to change the certificate in a way that the error does not occur as suggested in https://code.google.com/p/android/issues/detail?id=12955#c17

If someone indeed experiences this problem i will consider providing an android specific implementation of Java-Websockets which does not use channels.

@2fours
2fours commented Feb 5, 2013

For me it's a showstopper as Gingerbread comprises 47% of the Android market, and I can not change the SSL certs issued to me. I have changed Gottox socket.io-java client to use the AutoBahn websocket implementation and it is working for me.

@fg0711
fg0711 commented Feb 20, 2013

it can work on java console.but can not work on android 2.3 .can solve this problem?
i found socket.io use this sdk.how thire solve this problem.

@Davidiusdadi
Collaborator

@ fg0711 do you use a self signed certificate?

#141 (comment) might help you.

But if https://code.google.com/p/android/issues/detail?id=12955#c12 causes your problem than i am afraid that there is nothing can do for you...

Can you post a stacktrace or give further information?

@Davidiusdadi Davidiusdadi added a commit to Davidiusdadi/Java-WebSocket that referenced this issue Sep 3, 2013
@Davidiusdadi Davidiusdadi made websocket client use java.net instead of java.nio (addresses #88,
#155, #167, #175, #177, #187) (changes not yet fully tested)
9ee4212
@Davidiusdadi Davidiusdadi added a commit to Davidiusdadi/Java-WebSocket that referenced this issue Sep 3, 2013
@Davidiusdadi Davidiusdadi made websocket client use java.net instead of java.nio (addresses #88,
#155, #167, #175, #177, #187) (changes not yet fully tested)
9b0a4b8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.