javax.net.ssl.SSLHandshakeException: No appropriate protocol [How to Solve]

javax.net.ssl.sslhandshakeexception: no approve protocol error resolution
1. Problem descriptionA simple email sending program is developed in Java. The local operation is normal, but an error occurs when it is uploaded to the server

	javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
	at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1972)
	at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:642)
	at javax.mail.Service.connect(Service.java:317)
	at javax.mail.Service.connect(Service.java:176)
	at javax.mail.Service.connect(Service.java:125)
	at javax.mail.Transport.send0(Transport.java:194)
	at javax.mail.Transport.send(Transport.java:124)

2. Problem solving

1. Find the JDK directory/JRE/lib/security/java.security, remove SSLv3, tlsv1 and tlsv1.1 in jdk.tls.disabledalgorithm.

2. You need to execute the following commands to finally solve the error report. Refer to https://stackoverflow.com/questions/38205947/sslhandshakeexception-no-appropriate-protocol#

update-crypto-policies --set LEGACY

Similar Posts: