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