【问题标题】:Where to find user installed certificate android 4.0 and up在哪里可以找到用户安装的证书 android 4.0 及更高版本
【发布时间】:2013-03-18 22:44:58
【问题描述】:

我已按如下方式安装了我的证书 (.crt): 将设备连接到我的计算机->将证书复制到内部存储->在设备上转到设置->安全->从存储安装->并获得“安装成功”之类的东西(它要求我输入一个密码设备代码)。

然后我尝试在“设置”->“安全”->“受信任的凭据”中查找它,但在“系统”和“用户”选项卡中都找不到它...(我知道它应该在“用户”选项卡中,但它是空的) .

我认为安装过程没有问题,因为它要求我输入 PIN 码(并且在我通过单击安全菜单中的“清除凭据”删除所有证书之前不允许我撤消它)

帮助一些人?

谢谢!

【问题讨论】:

  • 嗨,还没有找到任何答案.. any1?
  • 您找到答案了吗?我有完全一样的问题。我的设备说:“已安装 XYZ 证书”,但似乎找不到在系统中“安装”它的方法。
  • 如果有任何帮助,您可以通过查看 /data/misc/keystore 来确认它已安装 此处非常有用的文章:nelenkov.blogspot.ca/2011/11/…
  • 在我看来,Android 只接受自签名 CA (ssCA)。不是自签名证书 (SSC)。此链接建议创建一个 ssCA 来签署 SSC 并将它们都导入。 (android.stackexchange.com/questions/61540/…)

标签: android security certificate ssl-certificate


【解决方案1】:

也有同样的问题。确保您正在安装的证书实际上是 CA 证书,而不仅仅是简单的 x509 证书。不幸的是,ICS 附带的证书安装程序会很乐意安装证书,即使它不是 CA 证书。它会误导性地说证书已成功安装。它甚至会将文件放在 /data/misc/keystore 下。但是,它不会向用户提供无法真正将该证书用于预期目的的反馈。

对于开发/测试,以下是有关如何创建此自签名 CA 证书的便捷指南:http://langui.sh/2009/01/18/openssl-self-signed-ca/

【讨论】:

    【解决方案2】:

    完成所有步骤后(将文件放在 /data/misc/keystore 下并确保证书是 CA),重新启动您的设备,证书应该会显示出来。

    【讨论】:

      【解决方案3】:

      自 API 24 (Android 7.0) 起,您已将其签入

      设置-->安全-->用户凭据

      您可以在其中列出所有用户证书。 低于 API 24 设置中没有显示用户证书的选项(带有私钥的 PKCS12)。我在 API 19 21 22 23 上检查的最简单的选项是安装证书,完成后使用 Google Chrome 转到需要 双向 SSL 身份验证的服务器强>应用。谷歌浏览器应该会显示已安装证书的列表。如果在没有 Google Chrome 的情况下使用虚拟设备,您可以从 this site 下载它。在虚拟设备的屏幕上下载拖放应用程序后。

      【讨论】:

        【解决方案4】:

        这个答案here 是一个很好的提示,但由于 Chrome 接受的正确证书(主题替代名称、摘要算法)发生变化,链接帖子中的某些内容已过时

        到今天为止,这里是完整的: 如果您有适当的 CA 证书,它会说“包括:... 1 CA”,如果它只说一个证书,它将安装但不充当 CA。

        首先,创建 myca.conf

        [ ca ]
        default_ca = myca
        
        [ crl_ext ]
        # issuerAltName=issuer:copy  #this would copy the issuer name to altname
        authorityKeyIdentifier=keyid:always
        
        [ myca ]
        new_certs_dir = /tmp
        unique_subject = no
        certificate = root.cer
        database = certindex
        private_key = privkey.pem
        serial = serialfile
        default_days = 365
        default_md = sha1
        policy = myca_policy
        x509_extensions = myca_extensions
        
        [ myca_policy ]
        commonName = supplied
        stateOrProvinceName = supplied
        countryName = supplied
        emailAddress = optional
        organizationName = supplied
        organizationalUnitName = optional
        
        [ myca_extensions ]
        basicConstraints = CA:false
        subjectKeyIdentifier = hash
        authorityKeyIdentifier = keyid:always
        keyUsage = digitalSignature,keyEncipherment
        extendedKeyUsage = serverAuth
        crlDistributionPoints = URI:http://mp-test.com.au/myca.crl
        
        subjectAltName = @alt_names
        

        仅在第一次运行这些命令:

        openssl req -newkey rsa:2048 -days 3650 -x509 -nodes -out root.cer
        openssl pkcs12 -export -out root.pfx -inkey privkey.pem -in root.cer
        cp privkey.pem root.pem
        touch certindex
        echo 01 > serialfile
        

        现在为每个域运行这些:

        domain=www.example.org
        openssl req -newkey rsa:2048 -days 3650 -x509 -nodes -out root.cer
        openssl req -newkey rsa:2048 -nodes -out ${domain}.csr -keyout ${domain}.key
        cat myca.conf > temp.conf
        printf "[alt_names]\nDNS.1=${domain}\n" >> temp.conf
        openssl ca -md sha512 -batch -config temp.conf -notext -in ${domain}.csr -out ${domain}.cer
        openssl x509 -noout -text -in ${domain}.cer
        openssl pkcs12 -export -out root.pfx -inkey privkey.pem -in root.cer
        

        root.pfx 是您可以安装在设备上的 CA 证书。 ${domain.cer} 是您的网站证书,一旦安装了 root.pfx,就应该信任它。

        【讨论】:

          猜你喜欢
          • 2021-02-12
          • 2013-02-26
          • 2014-07-19
          • 2017-01-23
          • 2020-11-10
          • 2016-04-24
          • 1970-01-01
          • 1970-01-01
          • 2015-05-10
          相关资源
          最近更新 更多