How to fix game made with Unity 2019.2 Android X509TrustManager rejected by Google Play

I have already found a way to solve and fix this, see next post, read it if you have any similar problem than this

Hello, I have made a game in Unity 3D 2019.2 Android and I have sent it to Google Play, I got this message,

Your app has a Security alert because is using an unsafe implementation of the X509TrustManager interface with an Apache HTTP client, resulting in a security vulnerability.

Please, I would be very grateful if you can you be so kind to help me in some way, to know where the X509TrustManager is inside Unity, where is it used in my project in Unity, and how to fix it, or where is it to modify it.

I have already searched a few hours over the internet any relation between Unity with X509TrustManager and Unity and have not been able to find any possible solution.

I use Split by architecture in Unity to build multiple APKs I do not have any custom Android Manifest, it is built by Unity when the build is made.

I am not using any SSL certificate or using Trustmanager in any way as far as I know. I do not use any kind of plugins and do not have any kind of in-app purchase. I do not collect any user data and do not connect to the internet as far as I know

I do not have installed the Google Play plugin, I only have the Unity PlayServicesResolver v1.2.124.0 (latest one )

Google told me to look at this reference, but I have no idea about this and I am using Unity and do not know where is this

X509TrustManager  |  Android Developers(java.security.cert.X509Certificate[ ]

It seems that it has any relation with java, but I have no idea about java, and I do not have any java files in my project, although I know that is used have to build the project in Unity for Android.

I am using the 3 external tools already recommended by Unity, Java JDK that is installed with Unity 2019.2 that is based on OpenJDK 1.8.0.152. Also the Unity ANdroid SDK and Unity NDK

I expected to find some documentation about where or how is used the X509Trustmanager inside Unity to configure it but do not know where is it

Please, I would be very grateful if you can be so kind as to help me in some way.

Thanks very much for any possible help

I have found a way to fix this and it does not related in any way to what is shown above

The way to solve this is to delete the UDP and Unity Channels folders that are inside the plugins folder as I do not use any kind of in-app purchase

I have sent the new APK to Google Play and now it shows that there is no vulnerabilities

I keep this here for anyone that may need it

Yes, it is due to UDP and Unity Channel, we are working to address it in a future release. That also implies that you previously installed Unity IAP and/or UDP. Generally if you don’t need a component, best to not install it.

So what does this mean, can we implement In App Purchase or not???

Is this still an issue? I’m having the same problem with unity 2021.3.6f1…

Please describe your issue, with steps to reproduce.

Fixed! Its seems that the error was provoked by the unity ads package. Once I uninstalled the package and talk to google support, all seems to properly go.