9

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-----
yossef douieb
  • 146
  • 1
  • 2
  • 12

1 Answers1

3

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
Ross Cradock
  • 103
  • 7
  • 3
    your solution worked, the certificate installed successfully. but, I am serving the .pem format cert and I get an SSL error on my android when trying to communicate. any idea? – yossef douieb Apr 23 '20 at 07:39