开发者

How does iOS verify the app bundle?

开发者 https://www.devze.com 2023-04-05 05:05 出处:网络
I understand that the app bundle is signed by Apple so that it cannot be modified, what I am wondering is if iOS actually reads in the entire bundle and recomputes the signature of the bundle or they

I understand that the app bundle is signed by Apple so that it cannot be modified, what I am wondering is if iOS actually reads in the entire bundle and recomputes the signature of the bundle or they use some tricks. For larger apps, 400MB+ it seems like hashing the whole bundle would take a significant amount of time. Is there are trick that speeds up the verification?开发者_如何学Go

For bonus points: Where does iOS store the signature? In the keychain?


The code signature is a file inside the app bundle, in, e.g., Whatever.app/_CodeSignature/CodeResources. It doesn’t require a hash of the entire bundle—just a few things inside it, like the binary and the Info.plist. This is why you can swap resources in a code-signed application—like one of the OS X system-installed apps, which are almost all code-signed as of Lion—without causing the system to refuse to run it.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号