๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๊ฐœ๋ฐœ/Web

[Web] Received fatal alert: handshake_failure ์—๋Ÿฌ

by ynzu๐Ÿค 2022. 3. 8.
๋ฐ˜์‘ํ˜•

 

์ด ์—๋Ÿฌ๋Š” ์„œ๋ฒ„์™€ ํด๋ผ์ด์–ธํŠธ๊ฐ„์˜ TLS ๋ฒ„์ „์ด ๋‹ฌ๋ผ์„œ ๋ฐœ์ƒํ•˜๋Š” ์—๋Ÿฌ์ด๋‹ค.

Received fatal alert: handshake_failure

 

์„œ๋ฒ„๋Š” JDK 1.6์ด๋ผ TLSv1๋งŒ ์ง€์›์„ ํ•˜๊ณ  ์žˆ๋‹ค. ๋”ฐ๋ผ์„œ https.protocols์„ TLSv1๋กœ ์ง€์ •ํ•ด์•ผ ํ•œ๋‹ค.

jdk ๋ฒ„์ „ Default Other Support
1.6 TLS 1.0 TLS 1.1(111์ดํ›„ ๋ฒ„์ „), SSL v3.0
1.7 TLS 1.0 TLS 1.1, TLS 1.2, SSL v3.0
1.8 TLS 1.2 TLS 1.0, TLS 1.1, SSL v3.0

โ€ป JDK 1.6.0_111 ์ดํ›„ TLS1.1 ์ง€์›, 1.6.0_121 ์ดํ›„ TLS 1.2 ์ง€์›(๋‹จ, jsse.enableSNIExtension ๋“ฑ์˜ ์˜ต์…˜ ์„ค์ •์€ ๋ถˆ๊ฐ€๋Šฅ)

 

ํ•ด๊ฒฐ ๋ฐฉ๋ฒ• 1

Run>Run Configurations์—์„œ Tomcat ์„ ํƒ ํ›„ Arguments ํƒญ์˜ VM arguments์— ์•„๋ž˜ ๋‚ด์šฉ ์ถ”๊ฐ€ ํ˜น์€ apache-tomcat/bin/catalina.sh์— ์•„๋ž˜ ๋‚ด์šฉ ์ถ”๊ฐ€ํ•˜๊ธฐ

-Dhttps.protocols=TLSv1

 

ํ•ด๊ฒฐ ๋ฐฉ๋ฒ• 2

System.setProperty() ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ https.protocols ์†์„ฑ ์ง€์ •ํ•˜๊ธฐ

System.setProperty( "https.protocols", "TLSv1" );

 

๊ทธ๋ฆฌ๊ณ  -Djavax.net.debug=all์„ ์ถ”๊ฐ€ํ•ด์ฃผ๋ฉด  SSL/TLS ๋””๋ฒ„๊น…์ด ๊ฐ€๋Šฅํ•˜๋‹ค.

 

 

728x90
๋ฐ˜์‘ํ˜•

๋Œ“๊ธ€