使用多个证书签署应用程序

发布于 2024-08-30 01:48:36 字数 430 浏览 2 评论 0原文

来自 https://developer.android.com/studio/publish/index 的签名文档.html

当系统安装应用程序更新时,如果新版本中的任何证书与旧版本中的任何证书匹配,则系统允许更新。

这表明一个应用程序可以使用多个证书进行签名。

这是一个有趣的选项,允许多个实体签署应用程序。例如:最初由设备制造商签名的系统应用程序。进一步的更新可以由开发人员签署。

我是否误读了文档或者这真的可能吗?如果是这样,怎么办?

应用程序是否有其他方式支持不同的证书并让两个或更多实体对其进行签名?

From the signing documentation at https://developer.android.com/studio/publish/index.html:

When the system is installing an update to an application, if any of the certificates in the new version match any of the certificates in the old version, then the system allows the update.

This indicates that an application can be signed with multiple certificates.

This is an interesting option to allow multiple entities to sign an application. e.g: A system application which was initially signed by the device's manufacturer. Further updates could be signed by the developer.

Am I misreading the documentation or is this really possible? If so, how?

Is there any other way for an application to support different certificates and with that, having two or more entities sign it?

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

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

发布评论

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

评论(2

难以启齿的温柔 2024-09-06 01:48:36

如果您在签名过程中使用不同的别名,则可以使用不同的证书对 apk 进行签名。

这将在 META-INF 文件夹内创建不同的文件。我不知道这对 Android 市场内的更新过程有何影响。

You can sign apks with different certificates if you use a different alias in the signing process.

This will create different files inside of the META-INF Folder. I don't know what the implications are for the update process inside the android market.

烟沫凡尘 2024-09-06 01:48:36

我找到了一个解决方案,虽然不是那么漂亮,但仍然是一个解决方案。

签名的 apk 文件包含以下内容:

  • 使用给定证书签名的文件
  • 使用公共证书密钥的 META-INF 文件夹

要拥有具有多个证书的 apk:

  • 各方对 apk 进行签名
  • 每个 apk 的 META-INF 内容都会被收集
  • 为一个新的 apk (这只是一个 zip 文件)已创建,并且 META-INF 文件夹包含所有证书

这将允许任何签名方更新 apk。

需要注意的是,无法在更新中添加证书。

I found a solution for this, not that pretty but a solution nonetheless.

A signed apk file consists of:

  • Files signed with a given certificate
  • a META-INF folder with the public certificate key

To have an apk with multiple certificates:

  • Each party signs the apk
  • The META-INF contents of each apk are collected
  • a new apk (this is just a zip file) is created and the META-INF folder contains all the certificates

This will allow any of the signing parties to update the apk.

One note, there is no possibility to add certificates in an update.

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