Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can't install SSL pem certificate android 10

I am trying to install a self-signed certificate (signed using a self-made CA cert). I managed to successfully install the CA certificate. But when I am trying to install a user certificate I get the following error: "private key required to install certificate." The certificate that I am trying to install is a pem cert and was generated using OpenSSL and I didn't have any problems with it on my windows system.

-----BEGIN CERTIFICATE-----
MIIEBzCCAm+gAwIBAgIRANYwbUh/QDsEm5Fc6h1epIEwDQYJKoZIhvcNAQELBQAw
................................................................
60Gv8K2bhDNaEp3cWKFt0f0FBGo2Md79lyJWMDviuGLDI0OmPgkGT4e+LesGAvAp
-----END CERTIFICATE-----
like image 356
yossef douieb Avatar asked Apr 18 '20 17:04

yossef douieb


People also ask

How do I trust an SSL certificate on Android?

Open Settings. Tap “Security” Tap “Encryption & credentials” Tap “Trusted credentials.” This will display a list of all trusted certs on the device.


1 Answers

Considering this is Android 10 I think this might be the same issue: Install self-signed certificates no longer working in Android Q

It mentions you need to combine the certificate with a key:

openssl pkcs12 -export -in YOUR_CREATED_CERT.crt -inkey YOUR_PRIVATE_KEY.key -out COMBINED_OUTPUT.p12
like image 64
Ross Cradock Avatar answered Sep 22 '22 02:09

Ross Cradock