开发者

How do you use a .p12 certificate on Android?

开发者 https://www.devze.com 2023-01-26 10:06 出处:网络
How do you use a .p12 certificate on Android? I tried adding it at Menu/Settings/Location and security.

How do you use a .p12 certificate on Android?

I tried adding it at Menu/Settings/Location and security.

When I do this the certificate disappears from the SD card but when I go to the website that needs the .p12-certificate I just get a connection error.

The certificate, password, and URL are all good. I triple checked them.

I am not the only one with this issue, right? My colleagues with iPad / iPhone can use it easily but on Android it's a pain in the ass. They just double click on the .p12 file, give ce开发者_StackOverflow中文版rtificate password, and they are set.

How come it's not like this on Android?


Make sure you copy the certificates to root of SD card.

Click on Settings->Location & Security/Security->(Install from SD card(scroll down -> Credential Storage).

Select the certificate.


Things have changed since the last answer in 2011. I'm doing this from an emulated Pixel 2 running Android R (version 10).

It's now possible to install the certificate from a download or from a google drive. The difference is trivial.

Installation

  1. Settings->Security->Advanced->Encryption & credentials->Install a certificate

Here you'll select the type of certificate you want to install. In my case it's a CA certificate (Certificate Authority) which I use to test some systems.

At this point you'll get a warning screen. It's kind of important as the entire basis of your device's security relies on the integrity of your certificates. If this is messed up, your device will have to be wiped to be secure again.

But I assume you know what you're doing.

  1. tap Install anyway.

You're taken to a screen with files in your Downloads directory. You can scroll around to see the possibilities. You can also click on the hamburger icon in the top left to reveal more options, such as listing your google drive account.

  1. Tap on the certificate file you want to install

You may see a popup dialog will asking you for the password to extract certificates. Hopefully the entity that supplied you with the certificate also gave you a password.

  1. Type in the password and cross your fingers.

If all is well you'll get a Toast saying that the certificate was installed.

Verification

You can view the certificates you have installed by via the following path:

  • Settings->Security->Advanced->Encryption & credentials->Trusted credentials and then clicking the USER tab.

Removing a certificate is as simple as tapping on it and then tapping the Remove button.


To import the certificate, all I had to do was to use the My Files app (or any app allowing to browse your filesystem), and then click on the p12 file. Once the certificate was imported, the apps requiring it for log-in prompted the option of using it.

0

精彩评论

暂无评论...
验证码 换一张
取 消