如何在 Android 上使用 .p12 证书?

发布于 2024-10-03 07:31:59 字数 309 浏览 0 评论 0原文

如何在 Android 上使用 .p12 证书?

我尝试将其添加到 Menu/Settings/Location 和安全性中。

当我执行此操作时,证书会从 SD 卡中消失,但是当我访问需要 .p12 证书的网站时,我只会收到连接错误。

证书、密码和 URL 都很好。我对它们进行了三次检查。

我不是唯一一个有这个问题的人,对吧?我的同事使用 iPad / iPhone 可以轻松使用它,但在 Android 上却很麻烦。他们只需双击 .p12 文件,提供证书密码,然后就可以设置了。

为什么安卓上不是这样呢?

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 certificate password, and they are set.

How come it's not like this on Android?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

风蛊 2024-10-10 07:31:59

自 2011 年上次回答以来,事情已经发生了变化。我是在运行 Android R(版本 10)的模拟 Pixel 2 上执行此操作的。

现在可以通过下载或谷歌驱动器安装证书。差别是微不足道的。

安装

  1. 设置->安全->高级->加密和加密凭据 -> 安装证书

您将在此处选择要安装的证书类型。就我而言,它是一个CA 证书(证书颁发机构),我用它来测试某些系统。

此时您将看到一个警告屏幕。这很重要,因为设备安全的整个基础依赖于证书的完整性。如果出现问题,您的设备将必须被擦除才能再次安全。

但我假设你知道自己在做什么。

  1. 点击仍然安装

您将进入一个屏幕,其中的文件位于“下载”目录中。您可以滚动查看各种可能性。您还可以单击左上角的汉堡包图标以显示更多选项,例如列出您的 Google 云端硬盘帐户。

  1. 点击要安装的证书文件

您可能会看到一个弹出对话框,要求您输入密码以提取证书。希望为您提供证书的实体也为您提供了密码。

  1. 输入密码并祈祷。

如果一切顺利,您将收到一个 Toast,表明证书已安装。

验证

您可以通过以下路径查看您已安装的证书:

  • 设置->安全->高级->加密和加密。凭据 -> 受信任的凭据,然后单击用户选项卡。

删除证书非常简单,只需点击证书,然后点击删除按钮即可。

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.

划一舟意中人 2024-10-10 07:31:59

确保将证书复制到 SD 卡的根目录。

单击设置->位置 & 安全/安全->(从 SD 卡安装(向下滚动 -> 凭证存储)。

选择证书。

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.

小鸟爱天空丶 2024-10-10 07:31:59

要导入证书,我所要做的就是使用“我的文件”应用程序(或任何允许浏览文件系统的应用程序),然后单击 p12 文件。导入证书后,需要它登录的应用程序会提示使用它的选项。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文