Davdroid - Self signed SSL certificate issues

I’m having some issues getting my phone to talk to my mail-in-a-box’s contacts and calendar. I can use the web browser to login in normally but Davdroid fails to set up and account with an “I/O error: Cannot verify hostname.”

I’ve tried the CADroid app that aims to install certificates easily but it can’t install the certificate as the CA flag in the Basic Constraints is not present.

How do I generate a self signed certificate that Android can use and install in on my mail-in-a-box box?

Hello. Please see https://github.com/mail-in-a-box/mailinabox/issues/271.

Thanks, this worked for me.

For anyone else having the same issue I edited the ssl.sh setup file as suggested in the github post, deleted all the files in the /home/user-data/ssl directory and re-ran the mailinabox setup. I then used the CAdroid app to install the new certificate on my phone.