Retrieve certificate expiration date from an .ipa file?

倖福魔咒の 提交于 2019-12-04 08:47:42

问题


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).

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

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


回答1:


Do the following:

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=Aug 4 16:08:00 2017 GMT

This is the certificate expiration date.



来源:https://stackoverflow.com/questions/36453102/retrieve-certificate-expiration-date-from-an-ipa-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!