Programando/Error-Handling
2021. 9. 12.
[Android] CertPathValidatorException μ€λ₯
μλλ‘μ΄λ ν¬λ‘€λ§ μ½λλ₯Ό ν
μ€νΈνλλ° λ€μκ³Ό κ°μ μ€λ₯κ° μκ²Όλ€. "javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found." ꡬκΈμμ μμΉμ ν΄λ³Έ κ²°κ³Ό, μ΄ λ¬Έμ λ₯Ό ν΄κ²°ν μ μκ² λμμ€ λΈλ‘κ·Έ κΈμ μ°Ύμ μ μμλ€. HttpsURLConnection.setDefaultSSLSocketFactory κΈ°λ³ΈμΌλ‘ μ€μ private void trustAllHosts() { // Create a trust manager that does not validate certificate chains TrustManager[] trustAll..