Build OpenSSL for iOS

本文介绍了如何在iOS平台上编译OpenSSL库,主要参考了1.0.2h版本的OpenSSL,并提供了用于编译的脚本链接,该脚本来源于GitHub上的OpenSSL-for-iPhone项目。
摘要由CSDN通过智能技术生成

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
  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值