Enable SSL3 in java


I have a program that connects to mailboxes, through IMAP , but there are some client boxes that, when the program tries to establish the connection, throws the following exception:


Server choose SSLv3, but that protocol version is not enabled or not   supported by the client.

I would like to know how I can enable this protocol from my program, if there is any property or something that can be established. I already searched in several places but I have not found the solution.

The application is made with java 8 u66 .

asked by jam1981 16.05.2016 в 22:21

2 answers


Go to the JRE installation folder

  • Open this file in a text editor: $JRE_HOME\lib\security\java.security
  • Find the line that says jdk.tls.disabledAlgorithms=SSLv3 and comment or delete it.

Then try again.

By the way, both from Java 8 update 31 / Java 7 update 76 that SSLv3 is disabled by default. 1

Note that SSLV3 is obsolete and should not be used unless absolutely necessary due to vulnerabilities .

answered by 16.05.2016 в 23:04

At the end I removed some lines from the code, where I said that I would use security, and it worked correctly. The lines I took were the following:

propiedades.put("mail.imap.ssl.enable", "true");
propiedades.setProperty("mail.imap.ssl.trust", servidor);

In the end the client did not have security enabled, but the java was throwing at me like I was using SSLv3.

answered by 23.05.2016 в 15:05