4

A website uses Let's Encrypt SSL certificate. An Android app calls an API of this website. It worked perfectly until around 20:00 2021-09-29 UTC

URL url = new URL("https://my.domain.com/Home/api/path");
HttpURLConnection huc = (HttpURLConnection) url.openConnection();

The above code starts to throw the following exception:

Unacceptable certificate: CN=R3, O=Let's Encrypt, C=US

I understand there is a planned significant change for Let's Encrypt SSL certificate: "DST Root CA X3 will expire on September 30, 2021. That means those older devices that don’t trust ISRG Root X1 will start getting certificate warnings when visiting sites that use Let’s Encrypt certificates. "

IMPORTANT:

  1. This exception happens on ALL Android devices, old or new.
  2. Web browsers (e.g., Chromes) work fine with the website.

I am wondering if anyone could offer a clue about why HttpURLConnection fails in this case? Is HttpURLConnection deprecated and should it be replaced with something else?

Hong
  • 17,643
  • 21
  • 81
  • 142
  • 1
    I'm having the same issue.... I don't know if I should make changes in the app or in the server. The strange thing is that browsers work fine – sebasira Sep 30 '21 at 18:03
  • @sebasira Your issue sounds identical to mine. I had no choice but to change the certificate from Let's Encrypt to one from IONOS. It was a bit of panic yesterday. – Hong Sep 30 '21 at 23:57
  • 1
    Thanks your input! I had the same feeling LOL! Actually as you said updating the certificate was enough. I thought I'll have no problem with the certificate because it was no more than a month old – sebasira Oct 03 '21 at 12:53
  • 2
    I'm having the same issue too, any solution? – fesave Oct 04 '21 at 15:39

0 Answers0