gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-05 08:02:23 27 4
gpt4 key购买 nike

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

最佳答案

一切。如果您阅读 Apple 关于 what to code sign 的文档,他们说:

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.

关于macos - 什么类型的文件可以在 Mac 上使用 codesign 进行签名?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7519192/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com