CertPathValidatorException connecting to a Let's Encrypt host on Android M or earlier
问题 [edit: If you are here for Let's Encrypt expiry event from January 2021, read this first https://letsencrypt.org/2020/12/21/extending-android-compatibility.html] Connecting to https://valid-isrgrootx1.letsencrypt.org/ via OkHttp on Android M or earlier fails, while the connection works on N or later. OkHttpClient client = new OkHttpClient(); try { Request request = new Request.Builder() .url("https://valid-isrgrootx1.letsencrypt.org/robots.txt") .build(); try (Response response = client