title: How to override the cipherlist sent to the server by Android when using HttpsURLConnection?
body: <p>During TLS negotiation, clients send a list of supported ciphers to the server, the server picks one, and encryption starts. I want to change this cipherlist sent to the server by Android, when I'm using <code>HttpsURLConnection</code> for communication.</p>
  
  <p>I know that I can use <code>setSSLSocketFactory</code> on the <code>HttpsURLConnection</code> object to set it up to use a <code>SSLSocketFactory</code>. This is useful when I want to change the trustmanager etc used by the <code>SSLSocket</code> returned by the <code>SSLSocketFactory</code>. </p>
  
  <p>I know that in general this ciphersuite list can be edited using an <code>SSLParameters</code> object and passing it to <code>SSlsocket</code> or <code>SSLEngine</code> objects using the methods they provide.</p>
  
  <p>BUT the <code>SSLSocketFactory</code> does not seem to expose such methods!</p>
  
  <p>I cannot find a way to change the <code>SSLParameters</code> of the returned <code>SSLSocket</code> objects created by the <code>SSLSocketFactory</code> I pass to <code>HttpsURLConnection</code>. </p>
  
  <p>What to do?</p>
  
  <p>I guess this is also relevant to Java in general, not only Android. Maybe there's an OO way to do it (e.g. extend <code>SSLSocketFactory</code> and provide that to <code>HttpsURLConnection</code>?)</p>