在没有 Keychain 的情况下将 codesign 添加到私钥 ACL [英] Add codesign to private key ACL without Keychain

查看:34
本文介绍了在没有 Keychain 的情况下将 codesign 添加到私钥 ACL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为稳定的 iPhone 应用设置持续构建/集成.

I'm trying to set up continuous builds/integration for a stable of iPhone apps.

我有:

  • 专用的 Mac Mini.
  • 名为build"的用户帐户
  • Hudson 通过在/Users/build/Library/中放置一个 plist 设置为构建的 LaunchAgent启动代理
    • 尝试作为以 hudson 身份运行的系统范围的 LaunchDaemon,但随后无法访问构建用户的登录钥匙串.长篇大论,充满心痛.
    • A dedicated Mac Mini.
    • A user account named "build"
    • Hudson set up as a LaunchAgent for build, by dropping a plist in /Users/build/Library/LaunchAgents
      • Tried as a system-wide LaunchDaemon running as hudson, but then had no access to the build user's login keychain. Long story, full of heartache.

      最大的问题是代码设计和钥匙串.

      The big problem is codesigning and the Keychain.

      我们代表客户的开发人员身份创建代码,因此我们有多个开发人员身份,我们将添加更多.

      We create code on behalf of our clients' developer identities, so we have several developer identities and we will be adding more.

      我想把 Mini 放在一个很黑的房间里,从不看它,但是当你第一次使用开发者身份构建时,会弹出一个 GUI 对话框,询问你是否要始终允许 codesign 访问开发者身份.

      I want to put the Mini in a deep dark room and never look at it, but the first time you build with a developer identity, a GUI dialog pops up asking if you want to always allow codesign to access the developer identity.

      假设您这样做了,该对话框会修改钥匙串访问控制列表 (ACL),以便允许协同设计.

      Assuming you do, that dialog box modifies the keychain access control list (ACL) so that codesign is allowed.

      您可以通过打开钥匙串访问、展开证书、选择私钥、右键单击、选择获取信息,然后切换到访问控制选项卡来查看此内容.原始"密钥将仅在其始终允许"应用程序列表中具有钥匙串访问权限.您在对话框中使用并确认的一个也将具有共同设计.

      You can view this by opening Keychain Access, expanding the certificate, selecting the private key, right-clicking, selecting Get Info, and then switching to the Access Control tab. A "virgin" key will only have Keychain Access in its "always allow" application list. One you have used and confirmed in the dialog box will have codesign as well.

      此框提供了一种添加应用程序的方法,但您获得了标准的 Finder 文件选择器,它隐藏了 Unix 文件夹.无法导航到/usr/bin/codedesign.所以无法手动添加!

      This box provides a way to add an application, except you get the standard Finder file picker, which hides Unix folders. There's no way to navigate to /usr/bin/codesign. So it's impossible to add manually!

      有人知道解决这个问题的方法吗?

      Does anyone know of a way around this?

      我知道一种方法使用 -安全导入"的 T 开关,但是您必须在首先导入密钥时指定 ACL,因此必须丢弃并重新导入 Keychain GUI 中添加的任何密钥.不是很好.

      I'm aware of one method using the -T switch of "security import" but then you must specify the ACL when you import the key in the first place, so any keys added in the Keychain GUI would have to be tossed and reimported. Not exactly very nice.

      推荐答案

      通常情况下,Keychain 的 Get Info 对话框呈现给您的文件系统的清理"版本不允许您访问隐藏的/usr/bin 目录,但我找到了解决方法.

      Normally the "cleansed" version of the file system that the Keychain's Get Info dialog presents to you won't allow you to access the hidden /usr/bin directory, but I found a way around this.

      1. 获取正常的 Finder 窗口以显示所有文件.如果您不知道如何执行此操作,看看这篇文章.
      2. 在普通的 Finder 窗口中,导航到/usr/bin
      3. 将 bin 拖到边栏中的 Places 区域.现在 bin 是您可以从任何地方访问的快捷方式.
      4. 在钥匙串的获取信息 -> 访问控制窗格中,单击+"按钮以打开查找应用程序对话框.
      5. 点击现在位于此侧边栏的地点"下方的垃圾箱.
      6. 导航并选择协同设计.
      7. 点击保存更改按钮.

      这篇关于在没有 Keychain 的情况下将 codesign 添加到私钥 ACL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆