openssl libs in Xcode 4

怎甘沉沦 提交于 2019-11-30 21:13:51

问题


as the title suggests, I'm struggling to make the inclusion of openssl libs in my xcode iOs project, such as:

#include <openssl/md5.h>
#include <openssl/sha.h>
#include <openssl/ripemd.h>

if anyone knows a good way to do it, that would be more than appreciated. I tried to add the

/usr/include/openssl 

to my inclusion paths in the project configuration, but it didn't turned out to be a good solution.

So, I was asking myself if anybody knew how to deal with it

thx a ton!

-k-


回答1:


For me, using OpenSSL on iOS involved building OpenSSL from source for the iOS architectures (though I suppose finding pre-compiled libs would also work), then adding the OpenSSL header files and configuring the project's Header Search Paths appropriately. I used this as a rough guide.

Just be sure you really need OpenSSL before you commit. There are lots of built-in crypto routines in Apple's CommonCrypto and Security frameworks.




回答2:


I ended up using ios-openssl, which worked very well for me.




回答3:


I downloaded openssl from OpenSSL.org (see the version marked "LATEST") and used this iOS build procedure. So far all is going well for me, but I'm in early stages of this development. The reason I needed OpenSSL was to do on-device in-app purchase receipt validation (see this Apple page on Validating Receipts Locally).



来源:https://stackoverflow.com/questions/9262938/openssl-libs-in-xcode-4

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