I am trying to connect to a website that uses a self-signed certificate in Android Studio. I'm getting error
java.security.cert.CertPathValidatorException: Trust anchor for certification path not found
for the URL object that I call openStream()
on.
Since my code is in a testing environment, I am looking for a solution to either disable cert checking altogether, or explicitly allow a cert.
I spent several hours yesterday looking for solutions, but every guide is several years old and uses depreciated HTTP libraries.