Get your FREE copy of "The Ultimate Guide of SSL"

Download Ebook

How to create and import Self Signed Certificate to Android Device

Steps to Install SSL Certificate in Android Device

Due to a bug in android internal code you need some extra steps while generating your certificate. Otherwise your self-signed certificate will not show up under “trusted credentials” in android menu.

Create an auxiliary file “android_options.txt” with this line inside:

  • basicConstraints=CA:true

Create self-signed certificate using these commands:

  • openssl genrsa -out priv_and_pub.key 2048
  • openssl req -new -days 3650 -key priv_and_pub.key -out CA.pem
  • openssl x509 -req -days 3650 -in CA.pem -signkey priv_and_pub.key -extfile ./android_options.txt -out CA.crt

Now our CA.crt certificate is almost ready.

⏬ ⏬  Get rid of “⚠️ Not Secure” warning with these trusted SSL Certificates  ⏬ ⏬ 

Convert certificate to DER format:

  • openssl x509 -inform PEM -outform DER -in CA.crt -out CA.der.crt

Import CA.der.crt:

  • Put the CA.der.crt onto the SD Card of your Android device (usually to internal one). It should be in the root directory.
  • 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.

95%
OFF

comodo-square-logo

Comodo Positive SSL

$6.55

Vendor Price: $41.73

Coupon Code: ASCSCPSSL4

Get It Now

78%
OFF

rapidssl-coupon-square-logo

RapidSSL Certificate

$13.45

Vendor Price: $69

Coupon Code: ASRSRSSL2

Get It Now

95%
OFF

comodo-square-logo

Comodo PositiveSSL Multi-Domain

$17.54 – 2 SAN Included

Vendor Price: $41.73

Coupon Code: ASCSCPMD4

Get It Now

Disclosure: AboutSSL appreciates your continuous support. It helps us tremendously to keep moving in the competitive SSL industry. Here most of the links which direct you to buy any SSL/TLS related service or products earns us a certain percentage of referral commission. Learn More