1. Are you ready for the Galaxy S20? Here is everything we know so far!

CertPathValidatorException Accessing Site with AWS ACM cert

Discussion in 'Android Development' started by Richard Bell, Feb 6, 2021.

  1. Richard Bell

    Richard Bell Lurker
    Thread Starter

    I'm trying to hit a web service on our site which uses an AWS issued cert. The site comes up fine with a browser on the phone but the app is getting "java.security.cert.CertPAthValidatorException: Trust anchor for certification path not found."
    This code worked fine with Android 9.
    Has anyone else ran into this issue? My iOS app has no problem hitting the web service only my Android java code.
    Code below.
    Code (Java):
    1.  URLConnection connection = null;
    2.             BufferedReader reader = null;
    4.             try {
    5.                 URL url = new URL(params[0]);
    6.                 //connection = (HttpURLConnection) url.openConnection();
    7.                 connection = url.openConnection();
    8.                 //connection.connect();
    11.                 InputStream stream = connection.getInputStream();

    1. Download the Forums for Android™ app!



Share This Page