I am calling a REST service using HTTPS on an android application. I already have working code for this, but now that I am using a newly installed server hosting the REST service I can no longer establish a connection.

1 Answer
1

Following the suggestion to use OpenSSL s_client it made me realize that I use the wrong port number for the connection. The new server is using the standard SSL port which was not the case for the other server I was using previously.

As the server was not responding according to the SSL protocol, the response could not be decoded meaningfully by OpenSSL and thus the Unknown Protocol Error.

For the people wanting to know how I used OpenSSL s_client (in your shell do):

$ openssl s_client -connect myhost.example.com:443

Then a truck load of information is shown regarding the SSL connection just opened.