Trust anchor for certification path not found 해결하기
Android 앱에서 https 연결을 시도하려고 할 때 Trust anchor for certification path not found 라는 에러가 발생하면서 연결이 실패했다. 서비스 중인 앱이라 부랴부랴 원인을 찾기 시작함. 원인은 해당 앱에 신뢰성 있는 인증서를 찾지 못했기 때문인 것 같다. 우선 첫번째로 TrustManager를 사용해서 인증서 회피를 시도했다. TrustManager[] trustAllCerts = new TrustManager[]{new X509TrustManager() { public java.security.cert.X509Certificate[] getAcceptedIssuers() { return new java.security.cert.X509Certificate[]..
2021.11.25