cd back-end/java

HTTP 통신 handshake_failure 에러 해결방법

성덕 2016. 12. 16. 08:45

 

* 증상 : javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure.

 

* 원인 : ssl 인증서의 tls버전차이임. (서버는 1.2, 클라이언트는 1)

 

* 해결 :

 SSLContext context = SSLContext.getInstance("SSL");

 System.setProperty("https.protocols", "TLSv1"); <- 요 부분 추가해 줄것.