Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install self-signed certificates no longer working in Android Q

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?

like image 807
Dorinel Panaite Avatar asked Oct 22 '19 09:10

Dorinel Panaite


People also ask

How do I trust a self-signed certificate on Android?

Go to Settings / Security / Credential storage and select “Install from device storage”. The . crt file will be detected and you will be prompted to enter a certificate name. After importing the certificate, you will find it in Settings / Security / Credential storage / Trusted credentials / User.

What is the problem with self-signed certificate?

Not trusted by browsers and users Self-signed certificates contain private and public keys within the same entity, and they cannot be revoked, thus making it difficult to detect security compromises.


1 Answers

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!

like image 174
Benedito Marques Avatar answered Sep 18 '22 07:09

Benedito Marques