简体   繁体   English

IO代码签名澄清

[英]IOs code signing clarification

As I understand there are 4 possible ways to distribute applications on IOs: 据我所知,有4种方法可以在IO上分发应用程序:

  1. Development 发展
  2. Ad Hoc 特设
  3. Enterprise 企业
  4. App Store 应用商店

I understand how the Development way of distribution works. 我理解发展的分配方式是如何运作的。 You need to submit a certificate request to Apple and it issues a certificate for you. 您需要向Apple提交证书申请,并为您颁发证书。 Then you use this certificate to sign your applications. 然后使用此证书对您的应用程序进行签名。

However, it is unclear how Ad Hoc, Entreprise and App Store certificates work. 但是,目前还不清楚Ad Hoc,Entreprise和App Store证书的工作原理。 In particular: 特别是:

  • Ad Hoc can be installed on a wide range of divice, however, you do not need to specify the devices in provisioning profiles. Ad Hoc可以安装在各种设备上,但是,您无需在配置文件中指定设备。 Do you need to submit a special request to obtain Ad Hoc certificate, and how the enforcement on the level of device works? 您是否需要提交特殊请求以获取Ad Hoc证书,以及设备级别的执行如何运作?
  • Similarly, as I understand Enterprise certificate can be used to 同样,据我所知,可以使用企业证书
    install apps on different device (you do not need to specify them in advance). 在不同设备上安装应用程序(您无需提前指定)。 It seems that Enterprise is very similar to App Store 看起来Enterprise与App Store非常相似
    certificate, ie, I do not see the difference between them. 证书,即我看不出它们之间的区别。 How the security check of certificates works for Enterprise? 证书的安全检查如何适用于Enterprise?

My intuition that Apple works as a Certificate Authority but signs all these types of certificates with different root certificates, ie, developer requests are signed with Developer Apple root certificate, and Enterprise is with Enterprise Apple Root certificate. 我的直觉是Apple作为证书颁发机构,但是使用不同的根证书签署所有这些类型的证书,即开发人员请求使用Developer Apple根证书签名,Enterprise使用Enterprise Apple Root证书签名。 Then, during the installation on the device the type of the root certificate is checked and the corresponding decision is enforced. 然后,在设备上安装期间,检查根证书的类型并强制执行相应的决定。 Am I right? 我对吗?

The answer lies in provisioning profiles and not certificates or their authorities. 答案在于配置配置文件而不是证书或其权限。

There's no such thing as an Ad Hoc certificate. 没有Ad Hoc证书这样的东西。 There are only Distribution certificates and Development certificates. 只有分发证书和开发证书。 This is true for Enterprise accounts too, whose certificates are exactly the same (aside from account of provenance type). 对于企业帐户也是如此,其证书完全相同(除了出处类型的帐户)。 So Ad Hoc, App Store and Enterprise are all distribution certificates. 所以Ad Hoc,App Store和Enterprise都是分发证书。 All your certificates are signed by the same authority: The Apple Worldwide Developer Relations Certification Authority, and as such they can't have different root CAs. 您的所有证书都由相同的权限签署:Apple全球开发者关系证书颁发机构,因此他们不能拥有不同的根CA.

The differences lie in the provisioning profiles themselves, which are simply plists signed by Apple. 不同之处在于配置文件本身,这些只是Apple签署的plists。 iDevices trust some part of the WWDR certificate chain (the root CA?) and if the signature checks out, the provisioning profile is interpreted and a decision is made on whether a given app can be installed or run. iDevices信任WWDR证书链的某些部分(根CA?),如果签名检出,则解释配置文件,并决定是否可以安装或运行给定的应用程序。

Provisioning profiles say who can run what and on which devices. 配置文件说明谁可以运行什么以及在哪些设备上运行。 They're signed by Apple so a device can verify what they say. 它们由Apple签署,因此设备可以验证他们所说的内容。

The differences between the profile types that I can see are: 我可以看到的配置文件类型之间的差异是:

Enterprise profiles have 企业简介有

<key>ProvisionsAllDevices</key>
<true/>

Ad Hocs have 特设有

<key>ProvisionedDevices</key>
<array>
  UDIDs! You do, in fact, need to specify them for Ad Hoc!
</array>

And App Store profiles appear to have no special provisioning information. App Store配置文件似乎没有特殊的配置信息。 In fact I'm not sure they ever actually get installed on a device. 事实上,我不确定它们是否真的安装在设备上。

The command security cms -D -i your.mobileprovision is useful for exploring provisioning profiles. 命令security cms -D -i your.mobileprovision对于探索配置文件非常有用。

A Venn diagram I created to simplify the understanding of iOS provisioning profiles. 我创建的维恩图是为了简化对iOS配置文件的理解。 我创建的维恩图是为了简化对iOS配置文件的理解。 See the Google Drawing doc here: https://docs.google.com/drawings/d/1Td19Lf94Lep3h7jFD2mYdO564Y_LiWBaFaartDE8riU/edit?usp=sharing 请参阅此处的Google绘图文档: https//docs.google.com/drawings/d/1Td19Lf94Lep3h7jFD2mYdO564Y_LiWBaFaartDE8riU/edit? usp =sharing

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM