Building small SSL libs
Opened this issue · 3 comments
I built latest OpenSSL (1.0.2d) using this script: https://github.com/x2on/OpenSSL-for-iPhone. My problem is that it produced much larger static libs than the ones included with this project. libssl.a is 7.7MB and libcrypto.a is 36.8MB. This project's libssl.a is 2.28MB and libcrypto.a is 12.8MB. Can anyone please provide instructions for how to build minimal version of OpenSSL that only has functionality needed for receipt validation?
Once you link those against your target, they will automatically reduce in size. And if you have enabled bitcode, only the minimal slice will be included in the binary. I did this myself and my app is now half the size on my 5S.
I understand that linker will only link what's used, but I would like to keep the size of the library files themselves small. It's not a huge deal, but obviously the creators of this project figured out a way to do it and I was wondering if they could share the process.
Is there ANY way this can be done besides OpenSSL? That thing is a nightmare.