title: HTTP Client SSL Connection setEnabledCipherSuites
body: <p>I have an app which connects to a server via HTTPS.
  The server in question has a weak certificate which utilises RC4 Cipher (default support for which was recently removed from the JDK <a href="https://www.java.com/en/download/faq/release_changes.xml" rel="nofollow noreferrer">https://www.java.com/en/download/faq/release_changes.xml</a>)
  So following upgrade of the JDK, I am seeing javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure</p>
  
  <p>The release notes specify that you should use SSLSocket/SSLEngine.setEnabledCipherSuites()
  to specifically enable certain ciphers.</p>
  
  <p>However, using HttpsUrlConnection, or Apache's CloseableHttpClient, I can only find how to specify the SslSocketFactory. Which doesn't seem to provide function  .setEnabledCipherSuites.</p>
  
  <p>Found this post: <a href="https://stackoverflow.com/questions/23320787/why-does-sslsocketfactory-lack-setenabledciphersuites">Why does SSLSocketFactory lack setEnabledCipherSuites?</a></p>
  
  <p>My question is:
  Is there a way to get hold of the SSLEngine/Socket on an outbound client HTTP request so I can set the cipher suites before the handshake?</p>
  
  <p>Thanks in advance.</p>