OpenSSL的版本为1.0.2h
编译脚本如下:
#!/bin/bash
# This script builds the iOS and Mac openSSL libraries
# Download openssl http://www.openssl.org/source/ and place the tarball next to this script
# Credits:
# https://github.com/st3fan/ios-openssl
# https://github.com/x2on/OpenSSL-for-iPhone/blob/master/build-libssl.sh
set -e
usage ()
{
echo "usage: $0 [minimum iOS SDK version (default 7.0)]"
exit 127
}
if [ $1 -e "-h" ]; then
usage
fi
MIN_SDK_VERSION="7.0"
if [ -z $1 ]; then
SDK_VERSION="9.3"
else
SDK_VERSION=$1
fi
OPENSSL_VERSION="openssl-1.0.2h"
DEVELOPER=`xcode-select -print-path`
buildMac()
{
ARCH=$1
echo "Building ${OPENSSL_VERSION} for ${ARCH}"
TARGET="darwin-i386-cc"
if [[ $ARCH == "x86_64" ]]; then
TARGET="darwin64-x86_64-cc"
fi
pushd . > /dev/null
cd "${OPENSSL_VERSION}"
./Configure ${TARGET} --openssldir="/tmp/${OPENSSL_VERSION}-${ARCH}" &> "/tmp/${OPENSSL_VERSION}-${ARCH}.log"
make

本文介绍了如何在iOS平台上编译OpenSSL库,主要参考了1.0.2h版本的OpenSSL,并提供了用于编译的脚本链接,该脚本来源于GitHub上的OpenSSL-for-iPhone项目。
最低0.47元/天 解锁文章
748

被折叠的 条评论
为什么被折叠?



