Notice
Recent Posts
Recent Comments
Link
«   2024/07   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
Tags
more
Archives
Today
Total
관리 메뉴

ITSTEIN

javax.net.ssl.SSLHandshakeException 해결기 본문

JAVA

javax.net.ssl.SSLHandshakeException 해결기

the awesomest 2018. 3. 23. 10:48

자바로 http통신을 시도하던중, ssl handshake 에러가 발생하였다. 

통상 ssl hand shake exception은 ssl/tls의 버전이 맞지 않아서 발생하는 문제이다.

구글 검색을 통해서, 금방 문제를 해결할수 있었다.


============== 에러로그 ==============

javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) at sun.security.ssl.Alerts.getSSLException(Alerts.java:154) at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1959) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1077) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1312) at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:122)

==================================================

apache HttpClient의 sslContext설정에서 TLS 버전 변경으로 해결되었다. 

TLS -> TLSv1.2


참고 : https://www.lesstif.com/pages/viewpage.action?pageId=29590407#Java%EC%9D%98SSLHandshakeException%EB%AC%B8%EC%A0%9C%ED%95%B4%EA%B2%B0-SSLHandshakeException:Receivedfatalalert:handshake_failure


'JAVA' 카테고리의 다른 글

java.net.SocketException : Connection reset 에러 해결기  (1) 2018.03.23
spring과 mybatis 연동  (0) 2018.03.15
java equals(), hashCode() 분석  (0) 2018.03.14
JDBC, DBCP, JNDI는? DBCP vs JNDI  (0) 2017.07.11
Comments