Server selected an unsupported or disabled protocol: SSLv3

Trying to connect to an IMAP server from an application that uses javamail to connect. I can’t change the code, but it throws the error "Server chose an unsupported or disabled protocol: SSLv3", and I can not find a property that I can override to enable this protocol. The server I'm connecting to does not support TLSv1 (yes, it's old).

+3
source share
1 answer

You should be able to install a specific factory socket using SSLv3 instead of TLSv1 through the mail.smtp.ssl.socketFactoryJavaMail property (see Socket Factoryories in the JavaMail and MailSSLSocketFactory Release Notes ).

Before returning SSLSocketto implementation SSLSocketFactory( createSocket), use setEnabledProtocolsto allow SSLv3.

+1
source

Source: https://habr.com/ru/post/1740692/


All Articles