5 # Keep mbedtls_revision in sync with extlibs/mbedtls/SConscript's setting. Right now this script
6 # assumes mbedtls_revision is a tag; comment out the second clause if mbedtls_revision becomes
7 # a branch or a specific commit.
8 mbedtls_dir=`dirname -- "$(readlink -f "$0")"`/mbedtls
9 mbedtls_revision="mbedtls-2.4.0"
10 if [ ! -d ${mbedtls_dir} ]; then
12 echo "*********************************** Error: ****************************************"
13 echo "* Please download mbedTLS using the following command: *"
14 echo "* $ git clone https://github.com/ARMmbed/mbedtls.git extlibs/mbedtls/mbedtls *"
15 echo "***********************************************************************************"
18 elif [ ! -z $(git tag -l $mbedtls_revision) ]; then
20 echo "*********************************** Error: ****************************************"
21 echo "* mbedTLS repo is out of date. Please update mbedtls using the following commands:*"
22 echo "* $ cd (authoritative mbedTLS source repo location) *"
23 echo "* $ git fetch *"
24 echo "***********************************************************************************"
27 elif [ -d ${mbedtls_dir}/.git ]; then
29 git reset --hard ${mbedtls_revision} ; git apply --whitespace=fix ../ocf.patch
31 rm -rf ${mbedtls_dir}/.git*
33 echo "tizen: Checking if ocf.patch is applied in ${mbedtls_dir}"
34 grep -r 'TLS_ECDH_ANON_WITH_AES_128_CBC_SHA256' "${mbedtls_dir}"