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_url="https://github.com/ARMmbed/mbedtls"
9 mbedtls_dir=`dirname -- "$(readlink -f "$0")"`/mbedtls
10 mbedtls_reldir="extlibs/mbedtls/mbedtls"
12 mbedtls_revision="mbedtls-2.4.0"
13 if [ ! -d ${mbedtls_dir} ]; then
15 echo "*********************************** Error: ****************************************"
16 echo "* Please download mbedTLS using the following command: *"
17 echo "* $ git clone ${mbedtls_url} ${mbedtls_reldir} -b ${mbedtls_revision}"
18 echo "***********************************************************************************"
21 elif [ ! -z $(git tag -l $mbedtls_revision) ]; then
23 echo "*********************************** Error: ****************************************"
24 echo "* mbedTLS repo is out of date. Please update mbedtls using the following commands:*"
25 echo "* $ cd (authoritative mbedTLS source repo location) *"
26 echo "* $ git fetch *"
27 echo "***********************************************************************************"
30 elif [ -d ${mbedtls_dir}/.git ]; then
32 git reset --hard ${mbedtls_revision} ; git apply --whitespace=fix ../ocf.patch
34 rm -rf ${mbedtls_dir}/.git*
36 echo "tizen: Checking if ocf.patch is applied in ${mbedtls_dir}"
37 grep -r 'TLS_ECDH_ANON_WITH_AES_128_CBC_SHA256' "${mbedtls_dir}"