The app using LetsEncrypt certificates fails on Android phones running Android 7 or older .
Same applications on other phones with newer android versions are working fine.
The error received in the android application is:
java.security.cert.CertPathValidatorException: Trust anchor for certification path not found
It could be that we need some additional server configuration steps to support older android versions.
We suspected the issue was because private key algorithm being used was Elliptic Curve (EC) instead of RSA.
We updated certbot version to 2.60 and re-created certs , mentioning the Key Type as RSA, to see if it fails for older android versions. The same behavior was seen.
sudo certbot certonly --manual --manual-auth-hook /etc/letsencrypt/acme-dns-auth.py --key-type rsa --preferred-challenges dns --debug-challenges -d abc.def.ghi.com
We tried a couple of options we found online.
-
Android 7.0 can’t establish ssl connection
Android 7.0 can't establish ssl connection -
Any info on the upcoming ECDSA certificate chain with Android Compatibility
Any info on the upcoming ECDSA certificate chain with Android Compatibility - #3 by Nummer378 -
Extending Android Device Compatibility for Let's Encrypt Certificates
Extending Android Device Compatibility for Let's Encrypt Certificates - Let's Encrypt -
Reported ‘expired certificate’ when using DNS-over-tls on an android with letsencrypt cert
Reported 'expired certificate' when using DNS-over-tls on an android with letsencrypt cert -
Android devices with DoT configured; interaction with new default chain
Android devices with DoT configured; interaction with new default chain -
Let's Encrypt on Android gives java.security.cert.CertPathValidatorException: Trust anchor for certification path not found
certificate - Let's Encrypt on Android gives java.security.cert.CertPathValidatorException: Trust anchor for certification path not found - Stack Overflow
We passed fullchain.pem (which includes intermediate cert) instead of using cert.pem for the 'in' parameter.
sudo openssl pkcs12 -export -out /cert.pfx -inkey /etc/letsencrypt/live/abc.def.ghi.com/privkey.pem -in /etc/letsencrypt/live/abc.def.ghi.com/fullchain.pem -passout pass:
After we switched the certificates to Microsoft-App certs older versions of Android were working fine.
Can the Let's Encrypt certificates work for Android 7 and older?What should be the procedure to get them to work?