Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy getEnabledProtocols() returns TLS v1 instead of TLSv1.2?
    primarykey
    data
    text
    <p>I came to know from <a href="https://stackoverflow.com/a/11337538/1143977">this</a> post that JB supports TLSv1.2. Now I am dilemma, when I run the following test code. I get the supported protocol as TLS1.0 and not TLSv1.2. Am doing anything wrong?</p> <pre><code>public class SSLTest extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_ssltest); SSLSocketFactory mSslSocketFactory = null; SSLContext sslContext = null; try { sslContext = SSLContext.getInstance("Default"); } catch (NoSuchAlgorithmException e1) { // TODO Auto-generated catch block e1.printStackTrace(); } mSslSocketFactory = sslContext.getSocketFactory(); SSLSocket sock = null; try { sock = (SSLSocket)mSslSocketFactory.createSocket(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } String[] prots = sock.getEnabledProtocols(); for(int i=0;i&lt;prots.length;i++){ Log.d("TEMP","$$$$$$$$$$$$$$$$$$$$$$$ ::: " + prots[i]); } SSLParameters sslp = sock.getSSLParameters(); String[] newprots = sslp.getProtocols(); for(int i=0;i&lt;newprots.length;i++){ Log.d("TEMP","$$$$$$$$$$$$$$$$$$$$$$$ ::: " + newprots[i]); } } </code></pre> <p><strong>Output:</strong></p> <pre><code>10-11 11:57:53.280: D/TEMP(7928): $$$$$$$$$$$$$$$$$$$$$$$ ::: SSLv3 10-11 11:57:53.280: D/TEMP(7928): $$$$$$$$$$$$$$$$$$$$$$$ ::: TLSv1 10-11 11:57:53.280: D/TEMP(7928): $$$$$$$$$$$$$$$$$$$$$$$ ::: SSLv3 10-11 11:57:53.280: D/TEMP(7928): $$$$$$$$$$$$$$$$$$$$$$$ ::: TLSv1 </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload