I am trying to install the self-signed certificate for my web server in Android 4.3. I have the .crt file in the root of the SD card (which is actually emulated as I have no SD card in the slot).
To install the certificate I go to Setting -> General -> Security -> Credential Storage -> Install from device storage.
I get a dialog box showing the name of the certificate (the filename minus the .crt extension) which I can modify (but don't), a "used for" pull down with "VPN and apps" selected and text at the bottom of the dialog which informs "Package contains: one user certificate". Everything looks okay, so I click "Ok". The dialog goes away and a toast message pops up with "[name] installed".
However if I immediately go to "Trusted credentials and select "User" there is nothing there! The new cert is also not under "System" but I would not expect it there. If I go to a browser after this and try going to my web site, I still get the warning that the site's certificate is not trusted. I have also tried rebooting, but it doesn't make a difference.
What am I doing wrong? The complete lack of error messages isn't helpful. Is it possible my certificate is in the wrong format? I have tried using the .crt file in the server's ssl directory and I have tried converting it to DER format.
Update: I read somewhere that Android requires certificates to be in p12 format, so I converted the Apache2 certificate to p12 using the following command:
openssl pkcs12 -export -inkey server.key -in server.crt -out ~/server.p12
I then repeated the above steps, got the same success message, and then proceeded to still not see the certificate in the user credentials and I still get the untrusted certificate error from the mobile browser.