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

我有一个 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.

https://stackoverflow.com/questions/7519192/

相关文章:

oop - 实现对象关联基数的模式和实践

unix - SqLite3 NFS 挂载问题与锁定 - 我可以使用类似 CIFS nobrl 的东

sql-server - sql server 中的语言环境感知排序

.net - 如何获取 ASMX 生成的 WSDL soap :address to use htt

pdf - 打印时将空白页插入 PDF

interface-builder - 如何将 "turn off"透明度从 UIView 继承到

debugging - Valgrind 在 Fortran 代码中显示未初始化的变量

asp.net - 提交按钮间歇性地在 Chrome 中不执行任何操作

asp.net - asp.net 中的用户控件 (ascx) 及其可绑定(bind)属性未显示在数

php - PHP 中的滚动日志文件