使用OpenSSL对WebClip配置文件签名去调未验证

2023-07-04  本文已影响0人  Show_Perry

openssl签名

如果您只签名某个固定的配置文件,首推自带工具Apple Configurator,如果您的配置文件内容可变可以考虑openssl

  1. 首先,您需要有一个有效的开发者证书。您可以在 Apple Developer 网站上创建和下载一个开发者证书,这里最好是正式发布的证书。如果本地有可以直接导出xxx.p12

  2. 使用您的开发者证书签名您的 WebClip 配置文件。您可以使用OpenSSL 或者其他工具进行签名。以下是一个使用OpenSSL 的示例命令:

openssl smime -sign -in webclip.mobileconfig -out signed.mobileconfig -signer developer_certificate.pem -certfile apple_certificate.pem -outform der -nodetach

在这个命令中,webclip.mobileconfig 是您的未签名的配置文件,signed.mobileconfig 是签名后的配置文件,developer_certificate.pem 是您的开发者证书,apple_certificate.pem 是 Apple 的中间证书。

开发者证书制作

openssl pkcs12 -in developer_identity.p12 -out developer_identity.pem -nodes

苹果中间证书制作

下载的证书也是一个 .cer 文件。您可以使用同样的 openssl 命令将其转换为 .pem 格式。(注意这里下载Worldwide Developer Relations开头的)

截屏2023-07-05 10.06.19.png

下载后使用下面命令转换为pem格式:

 openssl x509 -in apple_identity.cer -inform DER -out apple_identity.pem -outform PEM
上一篇 下一篇

猜你喜欢

热点阅读