0

I'm using the standard Glide library to load and display images in my Android app.

After switching my image domain's SSL certificate to “Sectigo Public Server Authentication CA DV R36”, image loading fails on Android 12 and below, while it works without issue on Android 13, 14, and 15.

The error I'm receiving on older versions is:

javax.net.ssl.SSLHandshakeException:
java.security.cert.CertPathValidatorException:
Trust anchor for certification path not found
Glide.with(this)
    .load(imageUrl)
    .error(R.drawable.ic_person_black_24dp__1_)
    .into(binding.contentDashboardLayout.profileImage)

My API requests are working fine because I'm using SSL pinning, where I dynamically fetch the SHA-256 public key and pin it correctly.

However, images loaded through Glide fail because Glide uses its own internal OkHttpClient, which doesn't include my custom SSL pinning configuration.

How can I fix the image loading issue in my Android app? Do I need to make changes at the project level (e.g., Glide configuration), or should I change the SSL certificate provider to ensure compatibility with all Android versions?

2
  • 1
    "images loaded through Glide fail because Glide uses its own internal OkHttpClient" -- did you try supplying your own instead? Commented Jul 29 at 14:46
  • DVR 36 is not included in Android 12 (API 33 or higher) Trusted certificates, try using a different CA. Commented Nov 14 at 1:04

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.