发现一个不错的地方介绍如何在ios平台下编译openssl,试用了一下,成功了。
需要注意的一点是,需要用openssl1.0编译,同时编译出来的文件生成在openssl目录下面:libCrypto.a libssl.a
https://github.com/sjlombardo/openssl-xcode
In a normal case you would use it thusly:
Then, either open openssl.xcodeproj in XCode and initiate a build, or integrate it within another project:
$(SRCROOT)/Library/openssl/build/openssl.build/openssl/include
(Assuming you've put openssl.xcodeproj at the path Library/openssl, and are building from a source tarball) 4. Expand your target's "Link Binary With Libraries" build stage, and drag libcrypto.a from the openssl.xcodeproj group.
This project actually relies on the OpenSSL configure and make system to build the libraries. However, it does attempt to automatically detect and use the appropriate build settings for arch (i386/ppc/armv6), build tools, and SDK directories. This makes it appropriate for inclusion as a project reference into an iPhone application project. This project will also check to see if the resulting crypto library is newer than the project Makefile to avoid time consuming rebuild cycles.