AndroidAsync icon indicating copy to clipboard operation
AndroidAsync copied to clipboard

How to use websocket by "wss://" and specify the certification file? Can I ignore the ssl handshake?

Open grantfee opened this issue 10 years ago • 5 comments

grantfee avatar Jul 01 '16 09:07 grantfee

I am also trying to figure out answer for the same question. During development I am trying to use self-signed certificate at server and trying to ignore ssl handshake in android with this library but its not working. May be because I don't know how to do it exactly.

There should be some examples for "wss://" and certificate pinning.

rakeshpethani avatar Aug 31 '16 08:08 rakeshpethani

Any updates. I am having same issue?

Raj123456788 avatar Oct 10 '16 21:10 Raj123456788

Any updates? I also need a way to ignore SSL handshake.

rajohns08 avatar Oct 30 '16 07:10 rajohns08

You can do this by setting your own SSLContext and TrustManagers: AsyncHttpClient.getDefaultInstance().getSSLSocketMiddleware().setSSLContext(sslContext); AsyncHttpClient.getDefaultInstance().getSSLSocketMiddleware().setTrustManagers(trustManagers);

I found I also had to set the Origin header (meaning the uri of the webpage the socket is expected to be accessed from) on the request as the server expected this to be set, or would 403.

atomirex avatar Nov 14 '16 16:11 atomirex

2016-11-14 23:50 GMT+07:00 Nige [email protected]:

You can do this by setting your own SSLContext and TrustManagers: AsyncHttpClient.getDefaultInstance().getSSLSocketMiddleware().setSSLContext(sslContext); AsyncHttpClient.getDefaultInstance().getSSLSocketMiddleware(). setTrustManagers(trustManagers);

I found I also had to set the Origin header (meaning the uri of the webpage the socket is expected to be accessed from) on the request as the server expected this to be set, or would 403.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/koush/AndroidAsync/issues/467#issuecomment-260391025, or mute the thread https://github.com/notifications/unsubscribe-auth/AVJzXUIw_1U6_EisxNdAXgirImwxNSkeks5q-JFVgaJpZM4JC-Lb .

wraubon avatar Nov 28 '16 16:11 wraubon