Install certificate as System on Android

Use OpenSSL to transform the certificate to Android format (that is cert+info)
Extract ID using this command:
openssl.exe x509 -inform PEM -subject_hash -in charles.pem
It is the first line.
Name the certificate ID.0 (Ex: ce554431.0)
Extract certificate info using:
openssl.exe x509 -inform PEM -text -in charles.pem>somefile.txt
Then take the cert text and append the info and save it as ID.0

Certificate should be something like:
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
Certificate:
Data:
...

Then copy the certificate in the Android device to:
/system/etc/security/cacerts/

Or, if the certificate is already installed as user you can copy to system:
Copy it from:
/data/misc/user/0/cacerts-added/
To:
/system/etc/security/cacerts/

On both cases remember to set the permissions and user like the other certificates on the same folder, and that should be…

Notes:
– Some version of OpenSSL could give you a wrong ID, that will make the certificate not usable. In this case we used “OpenSSL 0.9.8h 28 May 2008 – GnuWin32″

AC.

This entry was posted in Android, Security and tagged , , , . Bookmark the permalink.

Comments are closed.