Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Set ciphers for HttpsURLConnection?

852668May 20 2012 — edited May 30 2012
Is there a way to set what ciphers (and protocols) a HttpsURLConnection should use?

We have some very old client code that uses the a custom socket class to communicate (via HTTP) to a server, we were looking at scraping this old code in lieu of the URLConnection class in Java, however; the user can set the SSL/TLS ciphers (and protocols) that can be used connect to the server, we basically use the SSLSocket.setEnabledCipherSuite(...) to do this. Looking at the HttpsURLConnection class there doesn't appear to be such a method and I do not see a readily available mechanism to do this.

Thanks in advance
This post has been answered by EJP on May 20 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 27 2012
Added on May 20 2012
5 comments
6,843 views