从.ipa文件中检索证书过期日期? [英] Retrieve certificate expiration date from an .ipa file?

查看:748
本文介绍了从.ipa文件中检索证书过期日期?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道如何查看.ipa文件的配置文件的截止日期(通过将ipa重命名为zip,然后解压缩并查看embedded.mobileprovisioning文件中的ExpirationDate键)。

I know how to view the expiration date of an .ipa file's provisioning profile (by renaming the ipa to zip, then unzip it and view the ExpirationDate key in the embedded.mobileprovisioning file).

但是如何查看用于签署ipa的证书本身的到期日期?

But how can I view the expiration date of the certificate itself that was used to sign the ipa?

我发现你可以使用代码签名实用程序提取证书:

I found that you can use the codesign utility to "extract" certs:

codesign --display --extract-certificates /Applications/Example.app

这会产生三个文件:codesign0,codesign1,codesign2。不确定如何继续。

This produces three files: codesign0, codesign1, codesign2. Not sure how to proceed after that.

推荐答案

执行以下操作:

unzip -q MyApp.ipa
$ codesign -d --extract-certificates Payload/*.app
$ openssl x509 -inform DER -in codesign0 -noout -nameopt -oneline -dates

执行上述操作后,您将获得输出:

After doing the above, you will get output with:


notAfter = 8月4日16:08:00 GMT

notAfter=Aug 4 16:08:00 2017 GMT

这是证书的到期日期。

这篇关于从.ipa文件中检索证书过期日期?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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