Dev_Log

[Java] PKIX path building failed

LeeDaniel 2024. 11. 19. 09:17
 [ 에러 ] 
javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
 

 [ Solution ]
cmd실행후 아래 명령어 입력

// Java SSL인증서 등록하기
keytool.exe -import -alias keytool에등록될별칭작성 -keystore "JAVA Home경로의 lib/security/cacerts경로 작성" -storepass changeit -file crt인증서파일의경로작성

예시)keytool.exe -import -alias key_naver.com -keystore "C:/Program Files/Java/jdk1.8.0_202/jre/lib/security/cacerts" -storepass changeit -file C:/_.naver.com.crt


// Java SSL인증서 등록된 목록 확인하기
keytool -keystore "JAVA Home경로의 /jre/lib/security/cacerts"  -storepass changeit -list -v

 

반응형