I’m trying to get SSL communication over TCP/IP, using SSLSockets. Once I get the SSLSocket and request the InputStream, I get the “no cypher suites in common” exception on the java (host) side, and on the client side I get: “javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x1b3da8: Failure in SSL library, usually a protocol error”. So what I did, was list every available cypher suite on the Android side, and Enabled them on the Server side. Still got the exact same exceptions.
Then I added the following line before getting the input streams:
sslSocket.setEnabledCipherSuites( sslSocket.getSupportedCipherSuites() );
and that worked. Obviously, I can’t use that on a production environment as I’d like to ensure that secure encryption is taking place.
So what am I doing wrong?
Thanks in advance
Usually this indicates a misconfiguration of the server keystore. If the server cannot find a valid private key then the only ciphersuites it can use are the anonymous diffie-hellman ciphersuites. Usually these are disabled on most platforms for security reasons.