Install self-signed certificates no longer working in Android Q

Dorinel Panaite picture Dorinel Panaite · Oct 22, 2019 · Viewed 9.2k times · Source

I have generated a self-signed certificate which I tried to install on my phone running Android 10, but a snack appears telling me that Private key required to install certificate.

I have tried on a phone running Android 9 with the same certificate and it works as expected.

Any idea if there is any workaround to get the CA installed?

Answer

Benedito Marques picture Benedito Marques · May 15, 2020

Great! My problem was solved with this code:

openssl pkcs12 -export -in test.crt -inkey test.key -out test-combined.p12

After this, I managed to import the test-combined.p12 certificate normally to my Android 10.

Thank you!