Git2-rs on Android got error "the SSL certificate is invalid"

Hi, there. I made an app with git2-rs, it works well on linux, but I got an error on Android like:
{ code: -17, klass: 16, message: "the SSL certificate is invalid" }

Does anyone know how to solove it?

Thank you.

Code would be helpful. Also, do you use a self-hosted git server (like gitlab, gitea, gogs, etc?). If so, how do you manage its SSL (aka TLS aka HTTPS) certificate?