在 Mac 上可以使用 codesign 对什么类型的文件进行签名?

发布于 2024-12-06 01:36:45 字数 153 浏览 3 评论 0原文

我有一个 xml 文档,想在 Mac 上打包并签名。我知道在 Windows 上您可以使用 Signtool 对 exe、dll、cab 和 ocx 进行签名,但到目前为止我只能在 Mac 上对 .apps 进行签名。在 Mac 上还可以使用 codesign 对哪些其他类型的文件进行签名?

I have an xml document I would like to package and sign on the Mac. I know on Windows you can sign exes, dlls, cabs, and ocxs with signtool, but so far I've only been able to sign .apps on Mac. What other types of files can be signed with codesign on Mac?

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

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

发布评论

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

评论(1

忘羡 2024-12-13 01:36:45

一切。如果您阅读 Apple 的文档 要编码什么符号,他们说:

您对应用程序的所有单独组件进行签名,不留任何空白,
包括:

  • 嵌套代码。首先,您递归地签署所有帮助程序、工具、
    您的应用程序依赖的库、框架和其他组件,
    并且与您的应用程序捆绑在一起。请参阅确保正确的代码
    嵌套代码签名,用于讨论如何正确嵌入
    并在应用程序包中签署嵌套代码。另请参阅使用库
    验证有关将库验证为
    系统策略的问题。
  • Mach-O 可执行文件。签名软件
    将单独的签名应用于每个架构组件
    代表应用程序主要可执行文件的通用二进制文件。
    这些是独立的,通常只是本地架构
    最终用户的系统已得到验证。应用签名、协同设计
    实用程序将签名直接添加到可执行文件。
  • 资源。应用程序包中所有不明确的内容
    代码(或者
    嵌套代码包或主要可执行文件)是一种资源,并且所有
    资源已签名。资源文件本身没有被修改
    作为签名的结果。相反,协同设计将数字化
    与应用程序包的所有非代码相对应的签名
    文件位于捆绑包内的特殊 plist 文件中,即
    内容/_CodeSignature/CodeResources。协同设计实用程序将
    此处也包含任何嵌套代码的签名,这就是嵌套代码的原因
    首先签署。

Everything. If you read Apple's documentation on what to code sign, they say:

You sign all the individual components of your app, leaving no gaps,
including:

  • Nested code. First, you recursively sign all of the helpers, tools,
    libraries, frameworks, and other components that your app relies on,
    and that are bundled with your app. See Ensuring Proper Code
    Signatures for Nested Code for a discussion of how to properly embed
    and sign nested code in your app bundle. Also see Using Library
    Validation for additional information about verifying libraries as a
    matter of system policy.
  • Mach-O executables. The signing software
    applies individual signatures to each architectural component of a
    universal binary that represents the main executable of your app.
    These are independent, and usually only the native architecture on the
    end user's system is verified. To apply the signature, the codesign
    utility adds the signature directly to the executable file.
  • Resources. Everything in an application bundle that is not explicit
    code (either
    nested code bundles or the main executable) is a resource, and all
    resources are signed. The resource files themselves are not modified
    as a result of signing. Instead, codesign places the digital
    signatures corresponding to all the application bundle’s non-code
    files in a special plist file within the bundle, namely
    Contents/_CodeSignature/CodeResources. The codesign utility places the
    signatures of any nested code here as well, which is why nested code
    is signed first.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文