I'm getting different HttpsURLConnection behavior upgrading from 1.3.1_01 to 1.4.2. After opening a connection, setting its SSL socket factory, and connecting, the SSL cipher suite and server cert chain are not available.
connection = (HttpsURLConnection)url.openConnection();
connection.setSSLSocketFactory(sslSocketFactory);
connection.connect();
httpResponseCode = connection.getResponseCode(); // OK!
cipherSuite = connection.getCipherSuite(); // IllegalStateException: connection not yet open
This worked in 1.3.1_01. Notice that the response code comes back, and the web server logs a successful connection, so the SSL handshake has completed!
Why is the cipher suite not available (nor the server cert chain)?
Any help greatly appreciated - nbaughman