Android Client connecting to the Server over SSL
I am trying to create an SSL connection from android client to the server over SSL. In the very beginning I was always getting
javax.net.ssl.SSLHandshakeException: no cipher suites in common on the server
when connection was attempted.
After some investigation I realized that Android uses Bouncy Castle SSL implementation and the cipher suites there are different from those SUN provides. So I've added Bouncy Castle provider to the server. The original problem went away, but I now get
Exception in thread "main" javax.net.ssl.SSLHandshakeException: NO SERVER CERTIFICATE FOUND
I am not sure why I get this. I have generated the certificate. Granted I am using JKS to store it, but why would it matter? It's just a format of storage, the certificate should be exactly the same.
If anyone has done non HTTP client server programming开发者_C百科 on Android using SSL I would really appreciate any pointers on what I need to do.
When I got this, the reason was that the server didn't have proper server certificate loaded. So double-check your server indeed has certificate to offer.
精彩评论